Documentation
¶
Index ¶
- func NamespaceNotFound(message string, alternatives []string) types.ErrorWithAlternatives
- type Application
- func (app *Application) Abbreviations(names []string) map[string][]string
- func (app *Application) Add(commands ...*command.Command)
- func (app *Application) AddCommands(commands []*command.Command)
- func (app *Application) All(namespace string) map[string]*command.Command
- func (app *Application) Definition() *input.InputDefinition
- func (app *Application) ExtractNamespace(name string, limit int) string
- func (app *Application) Find(name string) (*command.Command, error)
- func (app *Application) FindNamespace(namespace string) (string, error)
- func (app *Application) Get(name string) (*command.Command, error)
- func (app *Application) Has(name string) bool
- func (app *Application) Help() string
- func (app *Application) Namespaces() []string
- func (app *Application) RenderError(o output.OutputInterface, err error)
- func (app *Application) Run() (exitCode int, err error)
- func (app *Application) RunWith(i input.InputInterface, o output.OutputInterface) (exitCode int, err error)
- func (app *Application) SetDefaultCommand(commandName string, isSingleCommand bool) error
- func (app *Application) SetDefinition(definition *input.InputDefinition)
- type NamespaceNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceNotFound ¶ added in v0.5.0
func NamespaceNotFound(message string, alternatives []string) types.ErrorWithAlternatives
Types ¶
type Application ¶
type Application struct { Name string Version string LongVersion string DefaultCommand string CatchErrors bool AutoExit bool SingleCommand bool // contains filtered or unexported fields }
func (*Application) Abbreviations ¶
func (app *Application) Abbreviations(names []string) map[string][]string
func (*Application) Add ¶
func (app *Application) Add(commands ...*command.Command)
func (*Application) AddCommands ¶
func (app *Application) AddCommands(commands []*command.Command)
func (*Application) Definition ¶
func (app *Application) Definition() *input.InputDefinition
func (*Application) ExtractNamespace ¶
func (app *Application) ExtractNamespace(name string, limit int) string
func (*Application) FindNamespace ¶ added in v0.5.0
func (app *Application) FindNamespace(namespace string) (string, error)
func (*Application) Has ¶
func (app *Application) Has(name string) bool
func (*Application) Help ¶
func (app *Application) Help() string
func (*Application) Namespaces ¶
func (app *Application) Namespaces() []string
func (*Application) RenderError ¶
func (app *Application) RenderError(o output.OutputInterface, err error)
func (*Application) Run ¶
func (app *Application) Run() (exitCode int, err error)
func (*Application) RunWith ¶ added in v0.4.0
func (app *Application) RunWith(i input.InputInterface, o output.OutputInterface) (exitCode int, err error)
func (*Application) SetDefaultCommand ¶
func (app *Application) SetDefaultCommand(commandName string, isSingleCommand bool) error
func (*Application) SetDefinition ¶
func (app *Application) SetDefinition(definition *input.InputDefinition)
type NamespaceNotFoundError ¶ added in v0.5.0
type NamespaceNotFoundError struct {
// contains filtered or unexported fields
}
func (*NamespaceNotFoundError) Alternatives ¶ added in v0.5.0
func (e *NamespaceNotFoundError) Alternatives() []string
func (*NamespaceNotFoundError) Error ¶ added in v0.5.0
func (e *NamespaceNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.