So I figured out I was looking for the error in the wrong place.  The place 
it was failing was in go/types when it tries to parse the files, using the 
go/build.Default context.  Which is created 
here: https://github.com/golang/go/blob/master/src/go/build/build.go#L285

It uses either the GOROOT of the environment (which is invariably not set), 
or the GOROOT of the machine that built this binary.

Thanks to Dave, no one ever sets GOROOT, and so it defaults to the one from 
my OSX machine where I built the binary.  aaarrggg

So the fix is to call go env GOROOT and use that to set the GOROOT on 
build.Default and then it'll actually do the right thing.  Just in case 
anyone else ever hits this. (Hello me from the future!  You're welcome!)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to