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, req *cmds.Request) (cmds.ResponseEmitter, <-chan int, error)
- 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 ExitError
- type ResponseEmitter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoHelpRequested = errors.New("no help requested")
Functions ¶
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 ¶
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.