[54] Results

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 : 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 : Find the length of big.Int variable example

golang big-integer length

There is a chance that you will ever need to get the length of big.Int variable and below is a….... read more

Golang : How to get year, month and day?

golang year-month-day time-now-date

Problem :

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

Solution :

.... read more

Golang : Convert IPv4 address to decimal number(base 10) or integer

golang ip-address decimal-base-10 integer

Problem :

IP address in decimal is easier to search, filter or compare. For example, searching for IP address in….... read more

Golang : Calculate elapsed years or months since a date

golang elapsed-time date year month

This is additional tutorial to our previous tutorial on how to calculate elasped run time. We will learn….... read more

Golang : Convert int(year) to time.Time type

golang integer-time convert

Problem :

You have integer value such as a year and you want to convert the integer to time.Time type.….... read more