Documentation
¶
Index ¶
Constants ¶
View Source
const ( OnlyShortNoValue = OptionGroup(iota) // -v OnlyShortNoValueOptional // [-v] OtherOptional // [--long=value] Other // --long=value ActionGroup // { --help|--version} Hidden )
View Source
const ( Bold = ansiterm.Bold Underline = ansiterm.Underline )
View Source
const ( ColorData = "_synopsisColor" StyleData = "_synopsisStyle" )
Variables ¶
This section is empty.
Functions ¶
func ArgCounter ¶
func Placeholder ¶
Types ¶
type Command ¶
type Expr ¶
type Flag ¶
type Flag struct {
Short string
Shorts []rune
Long string
Primary string // Long if present, otherwise Short
Separator string
Names []string
AlternateNames []string
Value *Value
Group OptionGroup
Style Style
}
type OptionGroup ¶
type OptionGroup int
type Style ¶ added in v0.17.0
type Style struct {
// contains filtered or unexported fields
}
Style controls how the name of a flag, command, or expression is rendered in the synopsis. The zero value renders the name in Bold. When a color is set, it is used in place of the default Bold style unless a style is also set explicitly, in which case both are applied.
func StyleFromData ¶ added in v0.17.0
type Usage ¶
type Usage struct {
// contains filtered or unexported fields
}
func ParseUsage ¶
func (*Usage) Placeholders ¶
func (*Usage) WithoutPlaceholders ¶
Click to show internal directories.
Click to hide internal directories.