-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/doc: not printing package name in type query #31457
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
Comments
There's inconsistency for sure; this one doesn't print the package either:
Should the package always be printed? Maybe. Or maybe just if the arguments don't match the package name? There's also this, which is annoying. If I run that command in my home directory, not in a module directory, I get a distracting message containing nothing mentioned on the command line:
|
Change https://golang.org/cl/177797 mentions this issue: |
Change https://golang.org/cl/182619 mentions this issue: |
Updates #30029 Updates #31457 Change-Id: I08414a544615e74afb47f7a10a00f1e22adfd40c Reviewed-on: https://go-review.googlesource.com/c/go/+/182619 Reviewed-by: Katie Hockman <[email protected]>
Change https://golang.org/cl/206128 mentions this issue: |
If no writes to the package buffer happen, then the package clause does not get printed. This is a bug for cases where a file just contains the package clause. We fix this by separating the printing of package clause to a new function and calling it from (*pkgBuffer).Write as well as (*Package).flush. Updates #31457 Change-Id: Ia3bd0ea3963274c460a45d1e37fafc6ee0a197f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/206128 Run-TryBot: Agniva De Sarker <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rob Pike <[email protected]>
go doc big.NewInt
tells me what package it is talking about:but
go doc big.Int
does not:It seems like the package line should be printed always, and there is just a bug in this code path.
/cc @robpike
The text was updated successfully, but these errors were encountered: