install golang on ubuntu
This tutorial assumes that you have access to an Ubuntu 16.04 system, configured with a non-root user with sudo privileges as described in Initial Server Setup with Ubuntu 16.04.
ssh sammy@your_server_ip
cd ~
curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
tar xvf go1.6.linux-amd64.tar.gz
#You should now have a directory called go in your home directory. Recursively change go's owner and group to root, and move it to /usr/local:
sudo chown -R root:root ./go
sudo mv go /usr/local
sudo vim /etc/profile
export GOPATH=/media/raven/Data/gowork
export GOROOT=/usr/local/go
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
source /etc/profile
mkdir $HOME/work
nano ~/work/src/github.com/user/hello/hello.go