Posts tagged with featured
Golang Map (A Complete Guide)
In Golang a map is a data structure that stores key-value pairs. In this article, we will learn about the map data structure in Golang.
How to measure execution time in Go
To measure execution time in Golang we use time.Now() and time.Since() functions. Some other functions we can use are, `.Sub()`, and `.UnixNano` among others.
How to print structs in Go
To print structs we use the fmt package i.e fmt.Printf("%v", structName). This will print the struct in the format of a map. To print the struct in a more readable format we use the %#v format specifier. This will print the struct in the format of a struct.