Step 1 :
sudo add-apt-repository ppa:gophers/archive
sudo apt update
sudo apt install golang-1.8
Step 2 :
The workspace is "go" at your working directory by default (such as /home/samiux/go).
nano ~/.profile
Append the following lines at the end of the file :
export PATH=$PATH:/usr/lib/go-1.8/bin:$HOME/go/bin
Step 3 :
Log out and re-login.
or
source ~/.profile
Step 4 :
To test if it is working properly :
go version
go env
Step 5 :
Make sure you create the following directories at the "go" workspace :
mkdir -p {,~/go/bin,~/go/pkg,~/go/src}
You build your project, for example "erp", at "~/go/src/erp".
That's all! See you.