Created
May 21, 2017 14:24
-
-
Save sjehutch/b989bd47241457a972275c18abb2c709 to your computer and use it in GitHub Desktop.
install.sh golang
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
echo "Please enter your golang path (ex: $HOME/golang) :" | |
read gopath | |
echo "Please enter your github username (ex: vsouza) :" | |
read user | |
mkdir $gopath | |
mkdir -p $gopath/src/github.com/$user | |
export GOPATH=$gopath | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew install go | |
brew install git | |
brew install mercurial | |
go get golang.org/x/tools/cmd/godoc | |
go get golang.org/x/tools/cmd/vet | |
echo "go to https://golang.org/doc/code.html and enjoy :D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment