You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat gen.go
package test
//go:generate echo $GOOS
$ go generate gen.go
darwin
$ GOOS=linux go generate gen.go
darwin
The code in cmd/go/generate.go uses runtime.GOARCH and runtime.GOOS for these values. It should probably use the values from the buildContext global variable.
I think $GOARCH and $GOOS in "go generate" should depend on the environment variable first, like other go commands.
The text was updated successfully, but these errors were encountered: