Install everything/tools use Homebrew
brew install go
brew install dep
dep
is a the dependency management tool for Go
Setup $GOPATH
Add the following content to .zshrc
# Go development
export GOPATH="${HOME}/path/to/root/go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"
Tools
- Go for Visual Studio Code - https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go
- Go Outline - https://github.com/lukehoban/go-outline
- https://github.com/sqs/goreturns