Skip to content

Instantly share code, notes, and snippets.

@felipekm
Created October 15, 2018 03:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipekm/c4a12dafbfb67a92aad5d0590f219785 to your computer and use it in GitHub Desktop.
Save felipekm/c4a12dafbfb67a92aad5d0590f219785 to your computer and use it in GitHub Desktop.
Go lang in brew

Includes in .zshrc or .bashrc file

export GOPATH="${HOME}/.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"

  • source ~/.zshrc or source ~/.bashrc
  • brew install go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment