How to Create Constant Maps, Slices, & Arrays in Golang

How to Create Constant Maps and Slices in Go

For the most part, I’ve found that Go developers are pretty good at using global constants for configuration rather than global variables. However, a problem arises when we want a constant version of some of the more complex types. The Go compiler does not allow us to create array, map, or slice constants. After realizing …

Read more

The Proper Use of Pointers in Go (Golang)

photo 1497005367839 6e852de72767

Go has become increasingly popular in recent years, especially in my local area. It has been consistently displacing other backend languages like Ruby, Python, C# and Java. Go is wanted for its simplicity, explicitness, speed, and low memory consumption. Many developers that are new to the language, or new to a language that can handle …

Read more