[9] Results

Golang : Clean formatting/indenting or pretty print JSON result

golang json indent clean-format

Problem:

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

["apple","orange","durian","pear"]
.... 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 : 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 : Byte format example

golang round byte-format giga mega terra

Problem:

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


Golang : How to force compile or remove object files first before rebuild?

golang object-file go-build go-clean refresh

Problem :

You want to use rebuild or refresh your Golang program every time there is a change on any….... 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 : Format numbers to nearest thousands such as kilos millions billions and trillions

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

Problem:

You want to format a given number to the nearest thousands such as kilos, millions, billions, and trillions. For….... 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


Advertisement