Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdLine ¶
type CmdLine struct { *Command // contains filtered or unexported fields }
func New ¶
func New(app *application.Application, opts ...Option) (*CmdLine, error)
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func NewCommand ¶
type ConfigLoader ¶
type ConfigLoader func(app *application.Application, filepath string) error
type Loader ¶
type Loader[T any] func(app *application.Application, flag string) (T, error)
func Env ¶
func Env[T any](fn func(app *application.Application, env string) (T, error), envVars ...string) []Loader[T]
type Option ¶
type Option func(*CmdLine)
func WithConfigLoader ¶
func WithConfigLoader(loader ConfigLoader) Option
func WithHandler ¶
func WithVersionPrinter ¶
func WithVersionPrinter(printer VersionPrinter) Option
type VersionPrinter ¶
type VersionPrinter func(app *application.Application)
Click to show internal directories.
Click to hide internal directories.