Technotes for future me


Go snippets

Setting GOPATH

The GOPATH environment variable specifies the location of your workspace. If no GOPATH is set, it is assumed to be $HOME/go If you want to use a custom location as your workspace, you can set the GOPATH environment variable.


Edit your ~/.bash_profile to add the following line:

export GOPATH=$HOME/go

Run Go app

go run main.go

Go basics


Go has pointers. A pointer holds the memory address of a value.

Last updated on 31 Jan 2021
Published on 12 Oct 2020
Edit on GitHub