Skip to content

Instantly share code, notes, and snippets.

@shrekuu
Last active April 6, 2016 11:43
Show Gist options
  • Save shrekuu/0c4943d9ca2b51f083ce to your computer and use it in GitHub Desktop.
Save shrekuu/0c4943d9ca2b51f083ce to your computer and use it in GitHub Desktop.
mac install go lang
#!/usr/bin/env sh
# As of 20130519, go 1.1 has been released.
# The proccess of the gist should be OK for go 1.1 .
# magic pause
function pause(){
read -p "$*"
}
echo "add lines to .bashrc or .zshrc first"
pause 'Press [Enter] key to continue...[Ctril+C] to cancel.'
brew update && brew upgrade
brew install go
brew install git
brew install mercurial
mkdir $HOME/go
# mkdir -p $GOPATH/src/github.com/user
echo "installation done."
echo "export GOPATH=$HOME/go"
echo "getting gotour now..."
go get golang.org/x/tour/gotour
gotour
# for golang
# mkdir $HOME/go
# mkdir -p $GOPATH/src/github.com/user
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment