Documentation
¶
Overview ¶
Package cmdutil provides utilities for working with the command-line entrypoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUsageFunc ¶
func NewUsageFunc(cfg UsageConfig) func()
NewUsageFunc returns a function that returns a usage string.
Types ¶
type UsageConfig ¶
type UsageConfig struct {
// Name is the name of the command.
Name string
// Description is the description of the command.
Description string
// Prefixes is a list of flag prefixes to
// break into sections in the usage string.
Prefixes []string
// Flagset is the flagset to use for the command.
Flagset *pflag.FlagSet
// SkipPrefixes is a list of prefixes to skip
// when building the usage string.
SkipPrefixes []string
}
UsageConfig is the config for building a usage string.
Click to show internal directories.
Click to hide internal directories.