Skip to content

Instantly share code, notes, and snippets.

@gamesbrainiac
Created March 27, 2014 09:48
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 gamesbrainiac/9803962 to your computer and use it in GitHub Desktop.
Save gamesbrainiac/9803962 to your computer and use it in GitHub Desktop.
function goinit {
export GOROOT=/usr/local/Cellar/go/1.2.1/libexec
if [ $# -lt 1 ]
then
echo "No directories were created."
export GOPATH=$(pwd -P)
export PATH=$PATH:$GOPATH:$GOPATH/bin
else
echo "$1 being created"
mkdir $1
cd $1
mkdir src bin pkg
export GOPATH=$(pwd -P)
export PATH=$PATH:$GOPATH:$GOPATH/bin
fi
tree .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment