Created
July 23, 2013 14:59
-
-
Save toddlers/6063016 to your computer and use it in GitHub Desktop.
setting up golang on mac osx
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
# OS X Go Setup | |
# Assumes: | |
# + Homebrew has been installed correctly. | |
# + Homebrew-cask has been tapped and installed correctly. | |
# Install Go lang latest (1.1.1 as of May 13, 2013) | |
############################################################################### | |
brew install go | |
# Set up Go lang workspace | |
mkdir -p ${HOME}/Workspace/go-workspace | |
mkdir -p ${HOME}/Workspace/go-workspace/src | |
mkdir -p ${HOME}/Workspace/go-workspace/pkg | |
mkdir -p ${HOME}/Workspace/go-workspace/bin | |
# Set environment variable | |
echo -e "\n# Set GOPATH environment variable to the Go lang workspace." >> ${HOME}/.bash_profile | |
echo "GOPATH=\$HOME/Workspace/go-workspace:\$GOPATH" >> ${HOME}/.bash_profile | |
# Ensure GOPATH is set for the current shell session. | |
export GOPATH=$HOME/Workspace/go-workspace:$GOPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment