Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: default GOBIN to GOPATH/bin when outside of GOPATH? #23439
What version of Go are you using (
Thanks @cznic for your comment. What I understand from documentation and implementation is that the name of the argument is
Second suggestion, to
This ticket is intended to fix the inconsistency in
The use of GOPATH/bin only applies to packages stored in GOPATH.
go install /other/file.go is not considered to be in any GOPATH, so it can only use GOBIN.
In the long term, with modules, we expect that people will stop setting GOPATH and then GOBIN may be more important (or maybe it will increase pressure to default to GOPATH/bin).