You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NewFlagSet returns a new, empty flag set with the specified name and error handling property.
and (*FlagSet).Name() says
Name returns the name of the flag set.
But it's unclear to me why a flag set has a name at all. Skimming through the source code, it looks like the name field is only used in (*FlagSet).defaultUsage().
The intent of the name would be more clear if NewFlagSet's godoc mentioned that the name will be used in the default usage, if you do not override the Usage field.
The text was updated successfully, but these errors were encountered:
The godoc for
NewFlagSet
saysand
(*FlagSet).Name()
saysBut it's unclear to me why a flag set has a name at all. Skimming through the source code, it looks like the name field is only used in
(*FlagSet).defaultUsage()
.The intent of the name would be more clear if
NewFlagSet
's godoc mentioned that the name will be used in the default usage, if you do not override theUsage
field.The text was updated successfully, but these errors were encountered: