Documentation ¶
Overview ¶
Package flags contains common utilities for interacting with CLI flags
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Prefix prefix all flag names with a string Prefix string // NoShortHand do not add shorthand flags NoShortHand bool // Hidden mark flags as hidden (do not show in --help output) Hidden bool }
func (Options) Apply ¶
Apply rewrites the flags in the FlagSet in accordance with the given options so that: * flag name is prefixed with the given Prefix * flag name's shorthand flag is removed if NoShortHand is true * flag is hidden if Hidden is true
func (Options) NormalizedFlagName ¶
NormalizedFlagName given a flag name, apply prefix if one was configured
Click to show internal directories.
Click to hide internal directories.