dreamsparkx
10/20/2017 - 10:16 AM

Install Go on Mac OS X

Install Go on Mac OS X

1. Create Directories:

mkdir $HOME/Go
mkdir -p $HOME/Go/src/github.com/user

2. Setup Your Paths:

export GOPATH=$HOME/Go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

3. Install Go with Homebrew:

brew install go

4. Get the basics:

go get golang.org/x/tools/cmd/godoc