[47] Results

Golang : Turn string or text file into slice example

golang text-string convert-to-slice delete copy append

Alright, I need to parse a large number of text files that contain some raw data generated by a machine.….... read more

Golang : Find age or leap age from date of birth example

golang date-of-birth month-to-integer leap-year-age

Alright, here is a simple tutorial on how to calculate a person's age by a given date of birth string.….... read more

Golang : Convert a rune to unicode style string \u

golang rune unicode convert quote-rune-to-ascii

Continuing from previous tutorial on how to get escape characters or \u unicode style string. These are some….... read more

Golang : Convert octal value to string to deal with leading zero problem

golang octal leading-zero-problem convert-octal-to-string

Problem :

You have some integer variables or input data that starts with zero and they are causing some funky….... read more

Golang : Output or print out JSON stream/encoded data

golang json-stream write-to-responsewriter content-type

Problem :

You need to produce JSON stream or JSON encoded data to web browser or client. How to do….... read more

Golang : Get all countries phone codes

golang json-unmarshal-to-map countries-phone-codes iso

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

Golang : Display list of countries and ISO codes

golang json-unmarshal-to-map countries-name iso

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