Skip to content

Instantly share code, notes, and snippets.

@javouhey
Forked from gamesbrainiac/goinit
Created April 1, 2014 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javouhey/9906267 to your computer and use it in GitHub Desktop.
Save javouhey/9906267 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