Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FS for cli. FS = os.NewFS() // Name for cli. Name = env.NewName(FS) // Version for cli. Version = env.NewVersion() )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application for cli.
func NewApplication ¶
func NewApplication(register RegisterFunc, opts ...ApplicationOption) *Application
NewApplication for cli.
func (*Application) AddClient ¶
func (a *Application) AddClient(name, description string, opts ...Option) *Command
AddClient sub command.
func (*Application) AddServer ¶
func (a *Application) AddServer(name, description string, opts ...Option) *Command
AddServer sub command.
func (*Application) ExitOnError ¶
func (a *Application) ExitOnError(ctx context.Context)
ExitOnError will run the application and exit on error.
type ApplicationOption ¶
type ApplicationOption interface {
// contains filtered or unexported methods
}
ApplicationOption for cli.
func WithApplicationExit ¶
func WithApplicationExit(exiter ExitFunc) ApplicationOption
WithApplicationExit for cli.
type Command ¶
Command for cli.
func NewCommand ¶ added in v2.66.0
NewCommand creates a new command with the given name.
Click to show internal directories.
Click to hide internal directories.