Skip to content

Instantly share code, notes, and snippets.

@hacker65536
Last active June 16, 2016 08:06
Show Gist options
  • Save hacker65536/347da9d0320a71c1936e7b4f39fe1f58 to your computer and use it in GitHub Desktop.
Save hacker65536/347da9d0320a71c1936e7b4f39fe1f58 to your computer and use it in GitHub Desktop.
OS=linux
ARCH=amd64
VERSION=1.6.2
cd /usr/local/src
wget https://storage.googleapis.com/golang/go$VERSION.$OS-$ARCH.tar.gz
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
cat <<'EOF' >> ~/.bashrc
export PATH=$PATH:/usr/local/go/bin
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/work
export PATH=$GOPATH:$PATH
EOF
. ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment