We currently provide installers for Go for Windows (an .msi file) and macOS (a .pkg file).
Both installers add $GOROOT/bin to PATH. This lets users run commands like go build without having to edit PATH themselves.
However, users still need to edit PATH in order to run binaries installed with go install or go get. This introduces unnecessary confusion for new developers. To avoid this, both installers should add $GOBIN to PATH as well.
(Note that neither GOBIN nor GOPATH are likely to be set when an installer runs. If they are set, we should respect them; the goal is just to ensure that the directory where go install writes binaries is added to PATH).
We currently provide installers for Go for Windows (an .msi file) and macOS (a .pkg file).
Both installers add
$GOROOT/bintoPATH. This lets users run commands likego buildwithout having to editPATHthemselves.However, users still need to edit
PATHin order to run binaries installed withgo installorgo get. This introduces unnecessary confusion for new developers. To avoid this, both installers should add$GOBINtoPATHas well.(Note that neither
GOBINnorGOPATHare likely to be set when an installer runs. If they are set, we should respect them; the goal is just to ensure that the directory wherego installwrites binaries is added toPATH).