Installation
# download Go, mind the version
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
# remove the old version
sudo rm -rf /usr/local/go
# unzip the tarball unto the specified directory
sudo tar -C /usr/local -xzf go1.6.2.linux-amd64.tar.gz
# add path to bash
echo "export GOPATH=~/go" >> ~/.bashrc
# execute ~/.bashrc. once in this context
source ~/.bashrc
Build
go build -o /path/of/artifact /path/of/source-code
网友评论