Go: Map

A map is a collection of key value pairs, where you use the key to obtain the value that corresponds to it. The preceding code declares a map where the keys are of type int, and the values are of type string. var myMap map[int]string Initialize a map using the make function: Read more…

Go Environment – GOPATH

$GOPATH specifies the top-level directory containing source code for all our Go projects, this directory is known as Go Workspace The default value of $GOPATH /home/username/go in Linux Distribution platform. On Windows platform is /user/username/go. On the /home/username/go folder our Go workspace sub-folders must have the following which our task Read more…