Tutorials

golang.pngGolang : Print leading(padding) zero or spaces in fmt.Printf?

4th August 2015

Problem :

You want to include leading zero or spaces in front(prefix) of integer when printing out with fmt.Println() or….... read more



golang.pngGolang : How to check for empty array string or string?

4th August 2015

Sometimes that most obvious thing can be the hardest to remember. Putting this down as a note for myself and….... read more



golang.pngGolang : Image to ASCII art example

4th August 2015

This tutorial is just for fun and want to relive my DOS programming days for a while. In this tutorial,….... read more



golang.pngGolang : Time slice or date sort and reverse sort example

3rd August 2015

Sorting time.Time type and dates is pretty straight forward in Golang. Just curious why it is not included in the….... read more



golang.pngGolang : ISO8601 Duration Parser example

3rd August 2015

An example on how to parse ISO-8601 duration in string format and convert it to time.Duration type. However, this example….... read more



golang.pngGolang : Convert date or time stamp from string to time.Time type

3rd August 2015

Problem :

You have dates or time stamps in string format(usually from database) and you want to convert them into….... read more



golang.pngGolang : How to get hour, minute, second from time?

3rd August 2015

Problem :

You have unix timestamp or time stamp in string format. You want to convert the unix timestamps from….... read more



golang.pngGolang : How to get year, month and day?

3rd August 2015

Problem :

You want to extract the year, month and day from today's date. How to do that?

Solution :

.... read more



golang.pngGolang : How to get time zone and load different time zone?

3rd August 2015

Problem :

You need to get current time zone and load different time zone. How to do that in Golang?

.... read more



golang.pngGolang : Levenshtein distance example

2nd August 2015

Continue from previous tutorial on fuzzy string search. This is a short example on Levenshtein distance with .... read more



golang.pngGolang : Fuzzy string search or approximate string matching example

2nd August 2015

For this tutorial, we will learn how to do a fuzzy search in Golang. Fuzzy search or approximate string matching….... read more



golang.pngGolang : "https://" not allowed in import path

2nd August 2015

Problem :

Attempt to go get packages return this error message

"https://" not allowed in import path

Solution :

.... read more



golang.pngGolang : Get currencies exchange rates example

1st August 2015

Problem :

You are building an e-commerce website/application and you want to display prices in certain currencies. You need to….... read more



golang.pngGolang : Get all countries phone codes

31st July 2015

Continue from previous tutorial where we learn how to get all the currencies names, but this time it….... read more



golang.pngGolang : Get all countries currencies code in JSON format

31st July 2015

For this tutorial, we will learn how to get all the currencies names from http://country.io/currency.json and un-marshall them into a….... read more



golang.pngGolang : Display list of countries and ISO codes

31st July 2015

The code example below will download the JSON formatted data from http://country.io/names.json and unmarshal the data to display a list….... read more



golang.pngGolang : [json: cannot unmarshal object into Go value of type]

31st July 2015

Un-marshalling JSON data from external sources can be challenging sometimes. Encountered this error message while working on the previous .... read more



javascript.jpgWhich content-type(MIME type) to use for JSON data

30th July 2015

Problem :

Your program sitting in your web server is pumping out JSON data. You need to set the correct….... read more



Advertisement