-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/compile: usage prints to stdout instead of stderr #23234
Comments
use |
I already know that, but "tools behave differently" is the point |
All the tools print help messages to stderr. That is consistent. |
Have you checked: |
@mvdan is right, this is standard for all command line tools and the flag package when outputting usage information. Usage statements should by default be written in standard error output. You may check this article’s secrion “Where” for more information. Closing. Merry Christmas! 🎄🎅🎁 |
I think @jfcg has a point here, though - all the tools use stderr for usage messages, yet
Let's keep this issue open for that inconsistency. |
I cannot see a good reason why it would, and it seems like it has always printed to stdout since it was created in 2015 from all the separate compilers - will give this a go for 1.11. |
Change https://golang.org/cl/85418 mentions this issue: |
apparently go tool link uses stderr instead of stdout..
What version of Go are you using (
go version
)?go1.9.2 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux / amd64
What did you do?
go tool link --help | grep -i debug
What did you expect to see?
-debugtramp int
debug trampolines
What did you see instead?
the whole list of link options
working example
go tool compile --help | grep -i debug
The text was updated successfully, but these errors were encountered: