Versions in this module Expand all Collapse all v0 v0.7.1 May 1, 2020 v0.7.0 Apr 30, 2020 v0.6.1 Apr 17, 2020 v0.6.0 Apr 13, 2020 v0.5.0 Apr 13, 2020 v0.4.0 Apr 10, 2020 Changes in this version + func ErrorCode(c int) func(*CLI) + func MisuseCode(c int) func(*CLI) + func Name(s string) func(*CLI) v0.3.0 Apr 9, 2020 v0.2.1 Apr 9, 2020 v0.2.0 Apr 9, 2020 v0.1.1 Apr 9, 2020 v0.1.0 Apr 13, 2020 Changes in this version + func HelpDescription(s string) func(*CLI) + func Stderr(w io.Writer) func(*CLI) + func Stdout(w io.Writer) func(*CLI) + type Arg interface + AppendTo func(a *ArgList) + WriteDoc func(w io.Writer) + type ArgList struct + func (a *ArgList) Append(name string, v ArgValue, required, repeat bool) + type ArgValue interface + Set func([]string) error + type BoolOption struct + DefValue bool + Recipient *bool + func (fg BoolOption) Define(f *flag.FlagSet, name string) + type CLI struct + func New(entry *Command, opts ...func(*CLI)) *CLI + func (cli *CLI) ParseAndRun(args []string) int + func (cli *CLI) ParseAndRunContext(ctx context.Context, args []string) int + type Command struct + Arg Arg + Description string + Exec ExecFunc + Options map[string]Option + Subcommands map[string]*Command + Usage string + type ExecFunc func(Program) error + type Int64Option struct + DefValue int64 + Recipient *int64 + func (fg Int64Option) Define(f *flag.FlagSet, name string) + type IntOption struct + DefValue int + Recipient *int + func (fg IntOption) Define(f *flag.FlagSet, name string) + type Option interface + Define func(f *flag.FlagSet, name string) + WriteDoc func(w io.Writer, name string) + type OptionDetails struct + ArgLabel string + Description string + Short byte + func (ff OptionDetails) WriteDoc(w io.Writer, name string) + type Program interface + Name func() string + Stderr func() io.Writer + Stdout func() io.Writer + type RepeatingArg struct + Label string + Recipient *[]string + Required bool + func (arg RepeatingArg) AppendTo(a *ArgList) + func (arg RepeatingArg) WriteDoc(w io.Writer) + type StringArg struct + Label string + Next Arg + Recipient *string + Required bool + func (arg StringArg) AppendTo(a *ArgList) + func (arg StringArg) WriteDoc(w io.Writer) + type StringOption struct + DefValue string + Recipient *string + func (fg StringOption) Define(f *flag.FlagSet, name string) + func (fg StringOption) WriteDoc(w io.Writer, name string) + type VarOption struct + Recipient flag.Value + func (fg VarOption) Define(f *flag.FlagSet, name string)