[9] Results

Golang : Format numbers to nearest thousands such as kilos millions billions and trillions

golang format-numbers nearest-thousands truncate-huge-numbers


You want to format a given number to the nearest thousands such as kilos, millions, billions, and trillions. For….... read more

Golang : Populate slice with sequential integers example

golang sequential-integers negative-numbers slice array

Helping out a friend here, putting the code example down here for future references. Basically, he needs to generate a….... read more

Golang : Convert date string to variants of time.Time type examples

golang date convert-timestamp format-date

Here are few examples on how to convert a given date of string type to equivalent time.Time type. Most newbies….... read more

Golang : Clean formatting/indenting or pretty print JSON result

golang json indent clean-format


Your Golang program is producing JSON result in a single line that looks like this :

.... read more

Golang : How to control fmt or log print format?

golang fmt log printf-format

How to control fmt or log print format output? Use this reference as guide on how to control the fmt….... read more

Golang : Byte format example

golang round byte-format giga mega terra


You want to format the long integer or number string representing a byte size such as giga, mega, peta….... read more

Golang : Fix image: unknown format error

golang image-dimension width height unknown-format-error decode-config

Problem :

You want to find out the dimension of an image file with image.DecodeConfig() function - to….... read more

Golang : Convert date format and separator yyyy-mm-dd to dd-mm-yyyy

golang date-format yyyy-mm-dd dd-mm-yyyy british-date-format

Feeling bored today and just want to play around with date formats. It seems that Golang's time package.... read more