If the environment variable is unset, GOPATH defaults to a subdirectory named "go" in the user's home directory $HOME/go
Run go env GOPATH
to see the current GOPATH (its better to run this intead of echoing the GOPATH variable, because if it is unset it will show the default gopath)
go env GOPATH
/Users/mimigonz/go
Each directory listed in GOPATH must have a prescribed structure:
Here's an example directory layout:
GOPATH=/home/user/go
/home/user/go/
src/
foo/
bar/ (go code in package bar)
x.go
quux/ (go code in package main)
y.go
bin/
quux (installed command)
pkg/
linux_amd64/
foo/
bar.a (installed package object)