Skip to content

Instantly share code, notes, and snippets.

@sufuf3
Created October 11, 2019 10:58
Show Gist options
  • Select an option

  • Save sufuf3/ce67ea164dece90eb0847c48aac1946f to your computer and use it in GitHub Desktop.

Select an option

Save sufuf3/ce67ea164dece90eb0847c48aac1946f to your computer and use it in GitHub Desktop.

Revisions

  1. sufuf3 created this gist Oct 11, 2019.
    13 changes: 13 additions & 0 deletions golang-install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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