Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rhzs/82c6fc5f41601569a1a2 to your computer and use it in GitHub Desktop.
Save rhzs/82c6fc5f41601569a1a2 to your computer and use it in GitHub Desktop.
Go 1.5 Installation OS X 10.10.5

Installing go 1.5 with homebrew on OSX:

1) Create Directories

mkdir $HOME/go
mkdir -p $HOME/go/src/github.com/YOUR_USERNAME

-p means to create intermediate directories as required.

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

brew install go

4) "go get" the basics example:

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

5) Start here: https://golang.org/doc/code.html at "your first program"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment