Documentation
¶
Overview ¶
Package cli provides base constructs to build complex command line applications.
By nesting components, one can build command line applications like: the go command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct {
// Components are the sub-components of the current component
Components []*Component
// Run runs the component
// args are the arguments after the component name
Run func(ctx context.Context, comp *Component, args []string)
// UsageLine is the one-line usage message.
// The first word in the line is taken to be the component name
UsageLine string
// Short is the short description of the component
Short string
// Long is the longer more detailed description of the component
Long string
// contains filtered or unexported fields
}
Component represents a command line component
func (*Component) Runnable ¶
Runnable returns whether this component is runnable or pure informational
Click to show internal directories.
Click to hide internal directories.