Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MainUsageTemplate ¶
func MainUsageTemplate() string
MainUsageTemplate returns the usage template for the root command and wrap cobra flag usages to the terminal width
func SetCustomUsageFunc ¶
SetCustomUsageFunc configures a custom usage template for the provided cobra command. It returns an error if the command is nil.
func WrappedFlagUsages ¶
WrappedFlagUsages formats the flag usage string to fit within the terminal width
Types ¶
type HelpFlagPrinter ¶
type HelpFlagPrinter struct {
// contains filtered or unexported fields
}
func NewHelpFlagPrinter ¶
func (*HelpFlagPrinter) PrintHelpFlag ¶
func (p *HelpFlagPrinter) PrintHelpFlag(flag *pflag.Flag)
Click to show internal directories.
Click to hide internal directories.