[85] Results

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 : 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 : How to convert JSON string to map and slice

golang json-to-map json-to-slice array

Couple of simple examples on how to convert JSON string to map and slice(array).

Simple and straightforward way of converting….... 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 : How to pass map to html template and access the map's elements

golang index panic-assignment-to-entry-in-nil-map html-text-template slice-array

For this tutorial, we will learn how to pass a map to text or html template and learn how to….... 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 : Convert an image file to []byte

golang image convert byte

This is a quick tutorial on how to convert an image file to byte array. This question was originally posted….... read more

Golang : Convert []byte to image

golang image convert byte

There are times when you need to convert []byte to image for saving into file purpose. I encountered one of….... read more