Created
September 21, 2014 21:22
-
-
Save stewartjarod/167c544d4f0f4b231b5f to your computer and use it in GitHub Desktop.
Quick GO Lang setup
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 | |
# Install Go lang latest (1.3.1 as of Sept. 21, 2014) | |
############################################################################### | |
brew update | |
brew install hg | |
brew install go | |
# Set up Go lang workspace | |
mkdir -p ${HOME}/Projects/GO | |
mkdir -p ${HOME}/Projects/GO/src | |
mkdir -p ${HOME}/Projects/GO/pkg | |
mkdir -p ${HOME}/Projects/GO/bin | |
# Set environment variable | |
echo -e "\n# Set GOPATH environment variable to the Go lang workspace." >> ${HOME}/.zshrc | |
echo "export GOPATH=\$HOME/Projects/GO" >> ${HOME}/.zshrc | |
echo -e "\n# Add the Go Workspace's bin subdirectory to PATH." >> ${HOME}/.zshrc | |
echo "PATH=\$PATH:\$GOPATH/bin" >> ${HOME}/.zshrc | |
# Ensure GOPATH is set for the current shell session. | |
export GOPATH=$HOME/Projects/GO | |
export PATH=$PATH:$GOPATH/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment