This could be a bit better explained on the golang website.
First, note that there are potentially three environment variables
involved: PATH; GOROOT and GOPATH.
The Getting Started guide (https://golang.org/doc/install#install) gives
quite a lot of help, and you should read that thoroughly.
As you start working with Go, one other thing you may want to add to your
~/.bash_profile (on linux and mac, not sure about others) is
CDPATH=.:$GOPATH/src/code.google.com/p:$GOPATH/src/github.com:$GOPATH/src/bitbucket.org
export CDPATH
so let's say you have $GOPATH as
/home/my-name/work/gol
Thanks for the response, it makes sense now.
On Friday, September 23, 2016 at 12:13:30 AM UTC-4, leon.j...@gmail.com
wrote:
>
> I'm new to golang, and I'm trying to understand the role of GOPATH. The OS
> X package from https://golang.org/dl/ installs to `/usr/local/go/bin/go`.
>
> Do I have to
There are two parts in your question:
Am Freitag, 23. September 2016 06:13:30 UTC+2 schrieb leon.j...@gmail.com:
>
> [...]
> Do I have to manually symlink /usr/local/go/bin/go to my PATH because the
> GOPATH docs lead me to believe that GOPATH to need to be set to the
> directory where my go cod