-
-
Save tkhn/ac4efaf816821714e24ef6fde09b5dab to your computer and use it in GitHub Desktop.
Install Go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download Go (use any of the latest versions) | |
| curl -O https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz | |
| # Extract Go | |
| tar -xvf go*.tar.gz | |
| # Install Go | |
| sudo mv go /usr/local | |
| # Create a workspace folder | |
| mkdir -p ~/workspace | |
| cd ~/workspace | |
| # Set PATH and GOPATH | |
| # You should also add these to ~/.bash_profile | |
| export GOPATH=$HOME/workspace | |
| export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Go (use any of the latest versions) | |
| brew install go | |
| # Create a workspace folder | |
| mkdir -p ~/workspace | |
| cd ~/workspace | |
| # Set PATH and GOPATH | |
| # You should also add these to ~/.bash_profile | |
| export GOPATH=$HOME/workspace | |
| export PATH=$PATH:$GOPATH/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Go (use any of the latest versions) | |
| https://storage.googleapis.com/golang/go1.8.windows-amd64.msi | |
| # Create a workspace folder | |
| mkdir %USERPROFILE%\workspace | |
| # Open the Environment variables | |
| # control system -> Advanced system settings -> Environment variables | |
| # Make sure system variable PATH includes: C:\Go\bin | |
| # Set user variable GOPATH to:%USERPROFILE%\workspace | |
| # Append to user variable PATH (separate with semicolon): | |
| # %USERPROFILE%\workspace\bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment