-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/doc: always print package clause except for commands
There was an implicit heuristic before about when to print the package clause or omit it, but it was undocumented and confusing. Get rid of it and print it always unless asking for the package docs for a command, which are more of a usage message than a programming question. This simplifies the processing. There are several paths to the output, so to put the fix in one place we place a wrapper before the output buffer than adds the clause when Write is first called. The tests don't verify this behavior, but they didn't before either. Unsure what the right approach is but this will do for now. Fixes golang#31457 Change-Id: Ia6a9e740d556f45265c55f06b5306621c7a40ea9 Reviewed-on: https://go-review.googlesource.com/c/go/+/177797 Reviewed-by: Russ Cox <[email protected]>
- Loading branch information
Showing
1 changed file
with
35 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters