Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt interface { Name() string Short() string Help() string Default() reflect.Value Value() reflect.Value Item() Value FromEnv() bool EnvName() string HasSet() bool }
Opt is a single option
type Opts ¶
type Opts interface { Parse() ParsedOpts Opts() []Opt }
Opts contains flags, args and commands
type ParsedOpts ¶
type ParsedOpts interface { //Help returns the final help text Help() string //IsRunnable returns whether the matched command has a Run method IsRunnable() bool //Run assumes the matched command is runnable and executes its Run method. //The target Run method must be 'Run() error' or 'Run()' Run() error //RunFatal assumes the matched command is runnable and executes its Run method. //However, any error will be printed, followed by an exit(1). RunFatal() }
ParsedOpts ...
Click to show internal directories.
Click to hide internal directories.