[71] Results

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


Golang : Convert a rune to unicode style string \u

golang rune unicode convert quote-rune-to-ascii

Continuing from previous tutorial on how to get escape characters or \u unicode style string. These are some….... read more


Golang : Convert octal value to string to deal with leading zero problem

golang octal leading-zero-problem convert-octal-to-string

Problem :

You have some integer variables or input data that starts with zero and they are causing some funky….... read more


Golang : Convert(cast) int to float example

golang convert type-cast int float reflect-typeof

Problem :

You have a variable of type int and you want to convert/type cast it to float64 type. Also,….... 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 : Get time.Duration in year, month, week or day

golang date-time-stampelapsed time-duration convert

Problem:

When using time.Until() or time.Since() functions, the time.Duration type have methods such as Hour(), Minutes(), Nanoseconds() and Seconds() to….... read more


Golang : Handle or parse date string with Z suffix(RFC3339) example

golang Z-suffix UTC-date convert-timestamp RFC3339

You want to convert a RFC3339 date string with Z suffix such as 2016-09-01T15:23:01Z to Golang's time.Time date type.

.... read more


Advertisement