Skip to content

Instantly share code, notes, and snippets.

@fakihariefnoto
Last active October 7, 2023 22:27
Show Gist options
  • Save fakihariefnoto/5b5fa888cecf5cd7910d3e19a9febbde to your computer and use it in GitHub Desktop.
Save fakihariefnoto/5b5fa888cecf5cd7910d3e19a9febbde to your computer and use it in GitHub Desktop.
Setup golang, goroot, gopath, gobin

After download and move to your interested folder, add this line to ~/.bashrc and ~/.profile

export GOPATH=$HOME/gowork
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOPATH/bin
export GOROOT=/usr/local/go

export PATH=$PATH:$GOROOT/bin
@LukaGiorgadze
Copy link

LukaGiorgadze commented Nov 26, 2019

for Mac OSX replace first line export GOPATH=$HOME/gowork with GOPATH=$HOME/go

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