[9] Results

Golang : Convert an executable file into []byte example

golang byte-conversion write-read-file c executable

This small utility program will read an executable file(or just any file) and convert the content into a []byte slice.….... read more

Golang : micron to centimeter example

golang conversion centimeter micron


You need to convert centimeter to micron (ยต) in Golang. How to do that?


Simple. See the following….... 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

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 : constant 20013 overflows byte error message

golang write-byte

Haven't been updating the tutorials portion for a while as I was busy writing up examples for Golang bytes package. While executing the bytes.Buffer.WriteByte function….... read more

Golang : Convert(cast) []byte to io.Reader type

golang convert cast byte io-reader

Problem :

Need to convert XML data from http.Get() to io.Reader type for xml.NewDecoder() function to work . How to….... read more

Golang : Convert []string to []byte examples

golang string-slice byte-slice convert

Problem :

You need a fast way to convert a []string to []byte type. To use in situations such as….... 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