Documentation ¶
Index ¶
- func Usage() error
- type Arg
- type Args
- type Bool
- type CLI
- func (c *CLI) Arg(name string) *Arg
- func (c *CLI) Args(name string) *Args
- func (c *CLI) Command(name, usage string) Command
- func (c *CLI) Flag(name, usage string) *Flag
- func (c *CLI) Parse(ctx context.Context, args []string) error
- func (c *CLI) Run(runner func(ctx context.Context) error)
- func (c *CLI) Template(template *template.Template)
- func (c *CLI) Trap(signals ...os.Signal)
- func (c *CLI) Version(version string) *CLI
- func (c *CLI) Writer(writer io.Writer) *CLI
- type Command
- type Custom
- type Flag
- func (f *Flag) Bool(target *bool) *Bool
- func (f *Flag) Custom(fn func(string) error) *Custom
- func (f *Flag) Int(target *int) *Int
- func (f *Flag) Short(short byte) *Flag
- func (f *Flag) String(target *string) *String
- func (f *Flag) StringMap(target *map[string]string) *StringMap
- func (f *Flag) Strings(target *[]string) *Strings
- type Int
- type String
- type StringMap
- type Strings
- type Subcommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Arg ¶
type Arg struct { Name string // contains filtered or unexported fields }
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
type Subcommand ¶ added in v0.1.8
type Subcommand struct {
// contains filtered or unexported fields
}
func (*Subcommand) Arg ¶ added in v0.1.8
func (c *Subcommand) Arg(name string) *Arg
func (*Subcommand) Args ¶ added in v0.1.8
func (c *Subcommand) Args(name string) *Args
func (*Subcommand) Command ¶ added in v0.1.8
func (c *Subcommand) Command(name, usage string) Command
func (*Subcommand) Flag ¶ added in v0.1.8
func (c *Subcommand) Flag(name, usage string) *Flag
Click to show internal directories.
Click to hide internal directories.