Documentation ¶
Index ¶
- Variables
- func HandleHelp(appName string, req *cmds.Request, out io.Writer) error
- func LongHelp(rootName string, root *cmds.Command, path []string, out io.Writer) error
- func NewResponseEmitter(stdout, stderr io.Writer, enc func(*cmds.Request) func(io.Writer) cmds.Encoder, ...) (cmds.ResponseEmitter, <-chan int)
- func Parse(ctx context.Context, input []string, stdin *os.File, root *cmds.Command) (*cmds.Request, error)
- func Run(ctx context.Context, root *cmds.Command, cmdline []string, ...) error
- func ShortHelp(rootName string, root *cmds.Command, path []string, out io.Writer) error
- type Closer
- type ErrSet
- type ExitError
- type ResponseEmitter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoHelpRequested = errors.New("no help requested")
Functions ¶
func HandleHelp ¶ added in v1.0.0
func NewResponseEmitter ¶
func Parse ¶
func Parse(ctx context.Context, input []string, stdin *os.File, root *cmds.Command) (*cmds.Request, error)
Parse parses the input commandline string (cmd, flags, and args). returns the corresponding command Request object.
This function never returns nil, even on error.
Types ¶
type Closer ¶ added in v1.0.0
type Closer interface {
Close()
}
Closer is a helper interface to check if the env supports closing
Click to show internal directories.
Click to hide internal directories.