Go version
go version go1.25.1 linux/amd64
Output of go env in your module/workspace:
What did you do?
I ran several commands:
go doc -all runtime/metrics
go doc -short runtime/metrics
go doc -all -short runtime/metrics
What did you see happen?
With -all -short, go doc behaved the exact same way as with just -all. In other words, it seemed to ignore -short entirely and printed out all the documentation text.
What did you expect to see?
I think that -all -short should display the full API without documentation. I was looking for a quick way to get a concise text summary of the API surface and I was surprised that -all -short didn't work.
Alternatively, if -all and -short aren't supposed to work together, that should be documented and the tool should exit with a usage error rather than ignoring -short entirely.
I also filed an issue for a possibly-related -short bug at #77192.
Go version
go version go1.25.1 linux/amd64
Output of
go envin your module/workspace:What did you do?
I ran several commands:
go doc -all runtime/metricsgo doc -short runtime/metricsgo doc -all -short runtime/metricsWhat did you see happen?
With
-all -short,go docbehaved the exact same way as with just-all. In other words, it seemed to ignore-shortentirely and printed out all the documentation text.What did you expect to see?
I think that
-all -shortshould display the full API without documentation. I was looking for a quick way to get a concise text summary of the API surface and I was surprised that-all -shortdidn't work.Alternatively, if
-alland-shortaren't supposed to work together, that should be documented and the tool should exit with a usage error rather than ignoring-shortentirely.I also filed an issue for a possibly-related
-shortbug at #77192.