-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Description
The FlagSet type has a SetOutput method for setting the destination for
usage messages. This destination is used by the default Usage
function, but it's impossible to use it in custom implementations,
because no accessor for the output exists.
I propose adding a field or method to access the set output.
Relatedly, FlagSet.Usage currently writes the banner to os.Stderr,
ignoring the set output, while PrintDefaults writes to the set output.
What did you do?
https://play.golang.org/p/tDimNWwNwD
What did you expect to see?
This or similar code to compile and write to the set output
What did you see instead?
No way to do so.
mvdan and tmthrgd
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.