Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: "go env" does not print GOMAXPROCS #7666

Closed
rui314 opened this issue Mar 31, 2014 · 5 comments
Closed

cmd/go: "go env" does not print GOMAXPROCS #7666

rui314 opened this issue Mar 31, 2014 · 5 comments

Comments

@rui314
Copy link
Member

rui314 commented Mar 31, 2014

What does 'go version' print?
go version devel +0a3722aa9092 Mon Mar 24 21:22:16 2014 -0400 linux/amd64

What steps reproduce the problem?
Run "go env". Although it prints some runtime environment variables, such as a
value of GOPATH, it does not print GOMAXPROCS. 

What should have happened instead?
It should print a value of GOMAXPROCS.
@davecheney
Copy link
Contributor

Comment 1:

go env doesn't print some variables like GODEBUG either.
My personal opinion is we should not add this to the go env output
* GOMAXPROCS isn't forever, it might be removed or changed in the future
* I personally don't want to see it popularized any more than it has been 
* I believe that if setting GOMAXPROCS is required it shouldn't be done as part of a
login session, but when launching a specific Go binary, ie env GOMAXPROCS=2 myapp

@minux
Copy link
Member

minux commented Mar 31, 2014

Comment 2:

there are other runtime environment variables that `go env` doesn't print, e.g.
GODEBUG, GOTRACEBACK.
I don't think `go env` should print GOMAXPROCS.
GOPATH is entirely different, as it applies directly to go tool itself, and it's
not a runtime environment variable.

@minux
Copy link
Member

minux commented Mar 31, 2014

Comment 3:

yeah, the last point from Dave is especially important.
One shouldn't set GOMAXPROCS globally: it's a case-by-case setting.

@rui314
Copy link
Member Author

rui314 commented Mar 31, 2014

Comment 4:

Makes sense. I'm convinced. Can you close this issue if you can? (I can't.)

@minux
Copy link
Member

minux commented Mar 31, 2014

Comment 5:

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants