Ubuntu 一键卸载旧版并且安装最新版:
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
配置
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
export GOPATH=$HOME/gopath (可选设置)