[12] Results

Golang : Populate or initialize struct with values example

golang struct init populate-struct

A quick and short example on how to populate or initialize a struct with values. Pretty straight forward, but it….... read more


Golang : What is StructTag and how to get StructTag's value?

golang struct-tag

For those who code or read Golang's code and left wondering what are those string inside the '``' such as….... read more


Golang : How to get struct field and value by name

golang struct-field

In Go, there are times when we need to find out the value of a field in a given structure….... read more


Golang : How to unmarshal JSON inner/nested value and assign to specific struct?

golang inner-JSON unmarshal struct

Another tutorial to be recorded here after helping a newbie to Golang. His problem was how to deal with JSON….... read more


Golang : Implement getters and setters

golang get set identifier struct

Because Golang does not provide automatic getters and setters, Go programmers will have to implement the getters and setters themselves.….... read more


Unmarshal/Load CSV record into struct in Go

golang csv struct

This is just a slight variation to the previous go read csv file tutorial. In this tutorial, we….... read more


Golang : How to get struct tag and use field name to retrieve data?

golangstruct-field struct-tag field-by-name

Problem :

A structure data field can have additional information or meta-data. This information is known as struct tag in….... read more


Golang : Convert string slice to struct and access with reflect example

golang reflect slice-to-struct

Writing this down here for my own future references. Basically, what this code does is to convert a given string….... read more


Advertisement

Advertisement