application

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) All

func (app *Application) All(namespace string) map[string]*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) Find

func (app *Application) Find(name string) (*command.Command, error)

func (*Application) FindNamespaces

func (app *Application) FindNamespaces(namespace string) string

func (*Application) Get

func (app *Application) Get(name string) (*command.Command, 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳