Skip to content

Instantly share code, notes, and snippets.

@fd98279
Last active December 6, 2018 13:13
Show Gist options
  • Save fd98279/ab28361fd6eba72028ca40cc0b1a0bea to your computer and use it in GitHub Desktop.
Save fd98279/ab28361fd6eba72028ca40cc0b1a0bea to your computer and use it in GitHub Desktop.

Revisions

  1. fd98279 revised this gist Dec 6, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions go_setup.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ sudo mv go /usr/local
    export GOROOT=/usr/local/go
    # Location where all the go source code will reside
    mkdir -p $HOME/Workspace/repos/go
    mkdir -p $HOME/Workspace/repos/go/{src,bin}
    export GOPATH=$HOME/Workspace/repos/go
    # Location where go will save the binaries built
    export GOBIN=${GOPATH}/bin
  2. fd98279 revised this gist Dec 6, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions go_setup.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ sudo mv go /usr/local
    # Add to ~/.bashrc and ~/.profile (requried by VSCode)
    export GOROOT=/usr/local/go
    # Location where all the go source code will reside
    mkdir -p $HOME/Workspace/repos/go
    export GOPATH=$HOME/Workspace/repos/go
    # Location where go will save the binaries built
    export GOBIN=${GOPATH}/bin
  3. fd98279 renamed this gist Dec 6, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. fd98279 created this gist Dec 6, 2018.
    15 changes: 15 additions & 0 deletions .sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Based on instructions at https://golang.org/doc/code.html
    # Get latest go build
    wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz
    tar -xvf go1.11.2.linux-amd64.tar.gz
    sudo mv go /usr/local
    # Add to ~/.bashrc and ~/.profile (requried by VSCode)
    export GOROOT=/usr/local/go
    # Location where all the go source code will reside
    export GOPATH=$HOME/Workspace/repos/go
    # Location where go will save the binaries built
    export GOBIN=${GOPATH}/bin
    # Add binaries location to PATH
    export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
    source ~/.profile
    go version