Skip to content

Instantly share code, notes, and snippets.

@Skycocoo
Created September 6, 2018 15:14
Show Gist options
  • Save Skycocoo/b104697c5670de8e60954715dd0f9311 to your computer and use it in GitHub Desktop.
Save Skycocoo/b104697c5670de8e60954715dd0f9311 to your computer and use it in GitHub Desktop.
golang installation on mac with brew

Reference: 1

install golang with brew:

$ brew update
$ brew install golang

setting up PATH environment variable (in ~/.bash_profile):

export GOPATH=(the path of golang directory for source and binary)
export GOBIN=$GOPATH/bin
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment