[125] Results

Golang : Get timezone offset from date or timestamp

golang offset time-zone date-to-string

Problem :

You have a date or time stamp and you want get the time zone offset from the date.

.... read more


Golang : Parse date string and convert to dd-mm-yyyy format

golang dd-mm-yyyy date-time convert-string-date

A reader enquired on how to use Golang to convert date string such as "28th nov 2016" or "nov….... read more


Golang : convert int to string

golang strconv convert-to-string

While working on previous tutorial on displaying struct values in string format with a method. I stumbled upon….... 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 int to byte array([]byte)

golang integer-to-byte-array strconv convert-to-string

Problem :

You need to convert integer variable or constant to byte array ( [] byte ). How to do….... read more


Golang : Word limiter example

golang slice-to-string word-limiter count-words

Problem:

You want to limit a string to X number of words. How to do that?

Solution:

Break the string….... read more


Golang : convert string or integer to big.Int type

golang math-big-int string-to-integer setstring

Problem :

You have a big integer number in string format and you want to convert(cast) it to big.Int type.….... read more


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


Advertisement