golang/go
View on GitHubcmd/go: "go env" returns default value for GOPATH/GOSUMDB/GOPROXY, but not for GOBIN/GO111MODULE/GOTMPDIR
Open
#42,823 opened on Nov 25, 2020
GoCommandNeedsFixhelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
What version of Go are you using (go version)?
What did you do?
$ go env GOPROXY
https://proxy.golang.org,direct
$ go env GOSUMDB
sum.golang.org
$ go env GOPATH
/home/d630/go
$ go env GOBIN
$ go env GO111MODULE
$ go env GOTMPDIR
$
None of these envs are set specifically.
What did you expect to see?
I expect go env GOBIN to be evaluated as <gopath>/bin in a shell script.
What did you see instead?
go env GOBIN is evaluated as blank.