- Download and untar latest version of go at www.golang.org
- Set GOPATH and GOROOT environment variables. GOROOT points to go binary install. GOPATH points to your workspace (e.g. $HOME/go).
Notes from https://github.com/alco/gostart:
- Go is only compatible with code that resides in a workspace.
- Go does not allow you to depend on specific versions of external packages.
- There are no local packages, only fully qualified imports.
- All files in a single directory belong to one package
Official document here