Reputation: 546
I have installed GO on my Mac Book using the 10.8+ installer from golang.org, and I have set up a workspace. After running both these commands: export GOPATH=$HOME/go
and export PATH=$PATH:$GOPATH/bin
, echoing the GOPATH does return a value of /Users/dipen/go
; however, after restarting the terminal, the echoing the GOPATH returns nothing. How can I fix this?
Upvotes: 1
Views: 2238
Reputation: 11935
Add these lines to your ~/.bashrc or ~/.bash_profile:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Upvotes: 2