Skip to content

Instantly share code, notes, and snippets.

@sufuf3
Created October 11, 2019 10:58
Show Gist options
  • Save sufuf3/ce67ea164dece90eb0847c48aac1946f to your computer and use it in GitHub Desktop.
Save sufuf3/ce67ea164dece90eb0847c48aac1946f to your computer and use it in GitHub Desktop.
wget --quiet https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz
sudo tar -zxf go1.13.1.linux-amd64.tar.gz -C /usr/local/
echo 'export GOROOT=/usr/local/go' >> /home/$USER/.bashrc
echo 'export GOPATH=$HOME/go' >> /home/$USER/.bashrc
echo 'export PATH=/home/$USER/protoc/bin:$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/$USER/.bashrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=/home/$USER/protoc/bin:$PATH:$GOROOT/bin:$GOPATH/bin
# setup golang dir
mkdir -p /home/$USER/go/src
rm -rf /home/$USER/go1.13.1.linux-amd64.tar.gz
# Install govendor package manager
go get -u github.com/kardianos/govendor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment