Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// Name is just a one-word.
Name string
// Description of the command.
Description string
// Do will be invoked.
Do func(ctx context.Context, args []string) error
}
Command specifies a sub-command for a program's command-line interface.
type Config ¶
type Config struct {
// AppName is an optional name for the app, if empty os.Args[0] will be used.
AppName string
// AppDescription is an optional description. default is empty.
AppDescription string
// Version of the application.
Version string
// Context for commands, if nil context based on os.Interrupt will be used.
Context context.Context
// Args passed to the executable, if nil os.Args[1:] will be used.
Args []string
// Usage of the application, if nil default will be used,
Usage func(cfg Config, cmds []Command)
}
Config for the runner.
Click to show internal directories.
Click to hide internal directories.