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: go install documentation is lacking; effect of $GOBIN underdocumented #31576
It's been a while since I had to fiddle with my dev setup but I recently created a new separate go repo in my home directory and it took me a while to untangle where which binaries got installed. Specifically when it comes to uses of
I have no Go specific environment variables set but for
In a brand-new local repo of the Go distribution, after running
Only for binaries (main packages) outside
(This is all based in empirical evidence, I haven't studied the code. Happy to be corrected if I got this wrong.)
The documentation should be more clear. Right now we have lists of environment variables and respective documentation which is referred to from various places but it's not consistent.
More generally, it would be useful to document the recommended basic dev setup for people who want to work on the std lib. Specifically, where what is installed. Note that
Hmm is it possible to do it the other way around? So let's try to keep the consistency and do what the documentation suggest instead of modifying the doc. So $GOBIN is always king: go modules or go path or go root stuff doesn't matter, always put it in $GOBIN. I understand it will break a lot of things but nothing I think where make files and build scripts can't adapt to by modifying $GOBIN on the fly?