Tutorials
Golang : Write multiple lines or divide string into multiple lines
Problem :
You have a long string and you need to divide the string into multiple lines. How to do….... read more
Golang : Zip file
Go's standard library provides support for several archive file formats. Zip format is the most common standard of compressing file.….... read more
Golang : Convert uint value to string type
Problem :
You have an uint value and you want to convert(cast) the value into string.
Solution :
Use….... read more
Golang : How to split or chunking a file to smaller pieces?
Problem :
You have a big file and you want to split / chunk the file into smaller pieces. How….... read more
Golang : Drop cookie to visitor's browser and http.SetCookie() example
There are times developers need to drop cookie to website visitors' browser to determine if a particular visitor has been….... read more
Golang : Post data with url.Values{}
Just a short example on how to use url.Values{}. This code fragment is taken from previous tutorial on….... read more
Golang : Storing cookies in http.CookieJar example
Cookie can be useful for storing data and to be retrieved later on to fill in form values such as….... read more
Golang : Wait and sync.WaitGroup example
There are time when we need to get multiple things done concurrently first and make sure the processes result are….... read more
Golang : Get own process identifier
There are times when developer needs to know the own process identifier(PID) of the executing program during runtime. This is….... read more
Golang : If else example and common mistake
Maybe I'm so used to PHP before moving to Golang that I keep making the same mistake with IF-ELSE-THEN statement….... read more
Golang : How to make function callback or pass value from function as parameter?
There are times we need to evaluate a function and pass the evaluated value as parameter to a function. In….... read more
Golang : Strings to lowercase and uppercase example
A quick and short tutorial on how to change uppercase characters to lower case and vice-versa. If you string value….... read more
Golang : Calculate future date with time.Add() function
Problem :
You need to calculate future dates by number of days. This can be use in calculating expiring dates….... read more
Golang : Calculate time different
Problem :
You are looking to calculate the days between two dates. How to do that in Golang?
Solution :
….... read moreGolang : Get current, epoch time and display by year, month and day
Problem :
You need to get current and Epoch(Unix) time and display the time by year, month and day.
Solution….... read more
Golang : Progress bar with ∎ character
This tutorial is add on to the previous tutorial on how upload/receive progress indicator. Just a slight modification,….... read more
Golang : Concatenate (combine) buffer data example
At previous tutorial on how to concatenate ( combine ) strings data, a reader asked how to concatenate….... read more
Golang : Array mapping with Interface
New comers to Golang often have slight difficulty understanding how interface works in Golang. This is a simple tutorial to….... read more