Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
Created February 20, 2018 12:20
Show Gist options
  • Save ruanbekker/1488811813b20c3d8cf80a6c9a6c09a6 to your computer and use it in GitHub Desktop.
Save ruanbekker/1488811813b20c3d8cf80a6c9a6c09a6 to your computer and use it in GitHub Desktop.

Revisions

  1. ruanbekker created this gist Feb 20, 2018.
    11 changes: 11 additions & 0 deletions setup-golang.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/usr/bin/env bash
    mkdir -p ~/workspace/go
    cd /tmp
    wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
    tar -xf go1.8.1.linux-amd64.tar.gz
    sudo chown -R root:root ./go
    sudo mv go /usr/local
    rm -rf go1.8.1.linux-amd64.tar.gz
    echo 'export GOPATH=$HOME/workspace/go' >> ~/.profile
    echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile
    source ~/.profile