Step 1 :
sudo add-apt-repository ppa:gophers/archive
sudo apt update
sudo apt install golang-1.8Step 2 :
The workspace is "go" at your working directory by default (such as /home/samiux/go).
nano ~/.profileAppend the following lines at the end of the file :
export PATH=$PATH:/usr/lib/go-1.8/bin:$HOME/go/binStep 3 :
Log out and re-login.
or
source ~/.profileStep 4 :
To test if it is working properly :
go version
go envStep 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.