Document flag declaration rules
This commit is contained in:
@@ -64,6 +64,7 @@ func OccurrenceFlag[I, V any](meta FlagMeta, parse func(string) (V, error), set
|
||||
|
||||
// RenameFlag returns an independent binding with a new long name and no short
|
||||
// spelling. Parsing, defaults, completion, requiredness, and setters are retained.
|
||||
// The name follows the declaration rules in [FlagMeta].
|
||||
func RenameFlag[I any](flag Flag[I], name string) Flag[I] {
|
||||
binding := flag.binding
|
||||
binding.meta.Name = name
|
||||
|
||||
Reference in New Issue
Block a user