Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AfterRunner ¶
type AfterRunner interface {
After() error
}
AfterRunner is an interface for commands that run after the main run.
type App ¶ added in v2.0.3
type App struct {
RootNode *parser.CommandNode
Translator help.Translator
}
App represents a CLI application.
func (*App) AddCommand ¶ added in v2.0.3
func (a *App) AddCommand(name string, cmd *parser.CommandNode)
AddCommand adds a dynamic command to the application.
func (*App) Reload ¶ added in v2.0.4
Reload re-parses the root struct to pick up dynamic changes (e.g. map entries).
Example:
err := app.Reload()
func (*App) SetTranslator ¶ added in v2.0.4
func (a *App) SetTranslator(tr help.Translator)
SetTranslator sets the translator for the application.
type BeforeRunner ¶
type BeforeRunner interface {
Before() error
}
BeforeRunner is an interface for commands that run before the main run.
Click to show internal directories.
Click to hide internal directories.