Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBoolFlag ¶
Adds the given boolean-valued flag to the given command.
func AddStringFlag ¶
Adds the given string-valued flag to the given command.
Types ¶
type Flag ¶
type Flag[T any] struct { // Whether this flag is inherited by subcommands. Persistent bool Name string ShortName optionals.Optional[rune] DefaultValue T UsageMsg string Required bool Hidden bool DeprecationMsg optionals.Optional[string] // If given, then command-line completions will be restricted to filenames // having any of the given extensions. FilenameExts optionals.Optional[[]string] // Whether command-line completions should be restricted to directory names. DirNames bool }
Defines a command-line Flag.
Click to show internal directories.
Click to hide internal directories.