Documentation
¶
Overview ¶
Package cli provides tbd's command dispatcher: a small registry that commands join from their init() functions, plus the Context handed to each handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
Args and Parse are re-exported from the argv parser library so existing callers keep working while the parsing/validation logic lives in one place.
type Command ¶
type Command struct {
Name string
Summary string
Usage string
Spec argv.Spec
Run func(*Context) error
}
Command is a registered tbd subcommand. Spec declares the options it accepts; the dispatcher validates every invocation against it (merged with the global options), so unknown options get a helpful error instead of being ignored.
Click to show internal directories.
Click to hide internal directories.