When you run which go
it shows that you have installed Go in /usr/local/go/bin/go
.
But your GOROOT is /Users/stevenharms/go
.
Maybe I’m missing something, but that doesn’t make sense to me.
When I perform a clean install of Go:
- GOROOT points to the installation location.
- GOPATH points to the
go
directory in my home directory. This is where downloaded packages are stored (~/go/pkg
) and installed (~/go/bin
). - CGO_ENABLED is set to 1, so you don’t need to set this when compiling.