I've installed go using Homebrew on my OS X 10.10 machine. Every time I try to compile a sample app that imports net/http, I get the following error:
load cmd/cgo: package cmd/cgo: no Go source files in /Users/bbaron/google_appengine/goroot/src/cmd/cgo
I have my GOPATH variable set correctly ($HOME/go) and my directory structure appears to be correct:
Why does cgo seem to thing the GOPATH is $HOME/google_appengine/goroot
I previously (maybe a year ago) did some go development using App Engine, so there must be some left over garbage, but I can't figure out what I need to change to get this working.
I do have the App Engine SDK installed to $HOME/google_appengine but I don't see why that's affecting anything when I'm not importing any App Engine stuff.
EDIT: It looks like the problem is my GOROOT. The following are also in go env:
But even if I export a correct GOROOT and check with echo $GOROOT, go env does not see the correct GOROOT