When using build.Import("GOPATH/src/myCmd", "", 0) a *Package is
returned that has the field BinDir set to be GOPATH/bin.
Package.BinDir is documented as "command install directory".
However: cmd/go states "If the GOBIN environment variable is set, commands are
installed to the directory it names instead of DIR/bin."
(http://golang.org/cmd/go/#hdr-GOPATH_environment_variable)
Is it up to pkg/go/build to check for the existence of GOBIN? Or should a user
implementation check for GOBIN?
Example of a fix:
GeertJohan/rerun@b3bf4d7
pkg/go/build source code concerning the *Package BinDir field:
http://code.google.com/p/go/source/browse/src/pkg/go/build/build.go#521
When using build.Import("GOPATH/src/myCmd", "", 0) a *Package is returned that has the field BinDir set to be GOPATH/bin. Package.BinDir is documented as "command install directory". However: cmd/go states "If the GOBIN environment variable is set, commands are installed to the directory it names instead of DIR/bin." (http://golang.org/cmd/go/#hdr-GOPATH_environment_variable) Is it up to pkg/go/build to check for the existence of GOBIN? Or should a user implementation check for GOBIN? Example of a fix: GeertJohan/rerun@b3bf4d7 pkg/go/build source code concerning the *Package BinDir field: http://code.google.com/p/go/source/browse/src/pkg/go/build/build.go#521