Skip to content

Instantly share code, notes, and snippets.

@josephspurrier
Last active November 4, 2019 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save josephspurrier/9769f5e848feb8d54045f80a2c7d7fd0 to your computer and use it in GitHub Desktop.
Save josephspurrier/9769f5e848feb8d54045f80a2c7d7fd0 to your computer and use it in GitHub Desktop.
Install Go
# 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
# 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
# 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