Documentation
¶
Index ¶
- Variables
- func ArgVar(register Register, value Value, name string, options ...ArgOptionApplyer) error
- func Bool(register Register, name string, options ...FlagOptionApplyer) *bool
- func BoolArg(register Register, name string, options ...ArgOptionApplyer) *bool
- func BoolArgVar(register Register, p *bool, name string, options ...ArgOptionApplyer) error
- func BoolVar(register Register, p *bool, name string, options ...FlagOptionApplyer) error
- func Bools(register Register, name string, options ...FlagOptionApplyer) *[]bool
- func BoolsVar(register Register, p *[]bool, name string, options ...FlagOptionApplyer) error
- func Duration(register Register, name string, options ...FlagOptionApplyer) *time.Duration
- func DurationArg(register Register, name string, options ...ArgOptionApplyer) *time.Duration
- func DurationArgVar(register Register, p *time.Duration, name string, options ...ArgOptionApplyer) error
- func DurationVar(register Register, p *time.Duration, name string, options ...FlagOptionApplyer) error
- func Durations(register Register, name string, options ...FlagOptionApplyer) *[]time.Duration
- func DurationsVar(register Register, p *[]time.Duration, name string, ...) error
- func Float32(register Register, name string, options ...FlagOptionApplyer) *float32
- func Float32Arg(register Register, name string, options ...ArgOptionApplyer) *float32
- func Float32ArgVar(register Register, p *float32, name string, options ...ArgOptionApplyer) error
- func Float32Var(register Register, p *float32, name string, options ...FlagOptionApplyer) error
- func Float32s(register Register, name string, options ...FlagOptionApplyer) *[]float32
- func Float32sVar(register Register, p *[]float32, name string, options ...FlagOptionApplyer) error
- func Float64(register Register, name string, options ...FlagOptionApplyer) *float64
- func Float64Arg(register Register, name string, options ...ArgOptionApplyer) *float64
- func Float64ArgVar(register Register, p *float64, name string, options ...ArgOptionApplyer) error
- func Float64Var(register Register, p *float64, name string, options ...FlagOptionApplyer) error
- func Float64s(register Register, name string, options ...FlagOptionApplyer) *[]float64
- func Float64sVar(register Register, p *[]float64, name string, options ...FlagOptionApplyer) error
- func Int(register Register, name string, options ...FlagOptionApplyer) *int
- func Int16(register Register, name string, options ...FlagOptionApplyer) *int16
- func Int16Arg(register Register, name string, options ...ArgOptionApplyer) *int16
- func Int16ArgVar(register Register, p *int16, name string, options ...ArgOptionApplyer) error
- func Int16Var(register Register, p *int16, name string, options ...FlagOptionApplyer) error
- func Int16s(register Register, name string, options ...FlagOptionApplyer) *[]int16
- func Int16sVar(register Register, p *[]int16, name string, options ...FlagOptionApplyer) error
- func Int32(register Register, name string, options ...FlagOptionApplyer) *int32
- func Int32Arg(register Register, name string, options ...ArgOptionApplyer) *int32
- func Int32ArgVar(register Register, p *int32, name string, options ...ArgOptionApplyer) error
- func Int32Var(register Register, p *int32, name string, options ...FlagOptionApplyer) error
- func Int32s(register Register, name string, options ...FlagOptionApplyer) *[]int32
- func Int32sVar(register Register, p *[]int32, name string, options ...FlagOptionApplyer) error
- func Int64(register Register, name string, options ...FlagOptionApplyer) *int64
- func Int64Arg(register Register, name string, options ...ArgOptionApplyer) *int64
- func Int64ArgVar(register Register, p *int64, name string, options ...ArgOptionApplyer) error
- func Int64Var(register Register, p *int64, name string, options ...FlagOptionApplyer) error
- func Int64s(register Register, name string, options ...FlagOptionApplyer) *[]int64
- func Int64sVar(register Register, p *[]int64, name string, options ...FlagOptionApplyer) error
- func Int8(register Register, name string, options ...FlagOptionApplyer) *int8
- func Int8Arg(register Register, name string, options ...ArgOptionApplyer) *int8
- func Int8ArgVar(register Register, p *int8, name string, options ...ArgOptionApplyer) error
- func Int8Var(register Register, p *int8, name string, options ...FlagOptionApplyer) error
- func Int8s(register Register, name string, options ...FlagOptionApplyer) *[]int8
- func Int8sVar(register Register, p *[]int8, name string, options ...FlagOptionApplyer) error
- func IntArg(register Register, name string, options ...ArgOptionApplyer) *int
- func IntArgVar(register Register, p *int, name string, options ...ArgOptionApplyer) error
- func IntVar(register Register, p *int, name string, options ...FlagOptionApplyer) error
- func Ints(register Register, name string, options ...FlagOptionApplyer) *[]int
- func IntsVar(register Register, p *[]int, name string, options ...FlagOptionApplyer) error
- func RestBools(register Register, name string, options ...RestOptionApplyer) *[]bool
- func RestBoolsVar(register Register, p *[]bool, name string, options ...RestOptionApplyer) error
- func RestDurations(register Register, name string, options ...RestOptionApplyer) *[]time.Duration
- func RestDurationsVar(register Register, p *[]time.Duration, name string, ...) error
- func RestFloat32s(register Register, name string, options ...RestOptionApplyer) *[]float32
- func RestFloat32sVar(register Register, p *[]float32, name string, options ...RestOptionApplyer) error
- func RestFloat64s(register Register, name string, options ...RestOptionApplyer) *[]float64
- func RestFloat64sVar(register Register, p *[]float64, name string, options ...RestOptionApplyer) error
- func RestInt16s(register Register, name string, options ...RestOptionApplyer) *[]int16
- func RestInt16sVar(register Register, p *[]int16, name string, options ...RestOptionApplyer) error
- func RestInt32s(register Register, name string, options ...RestOptionApplyer) *[]int32
- func RestInt32sVar(register Register, p *[]int32, name string, options ...RestOptionApplyer) error
- func RestInt64s(register Register, name string, options ...RestOptionApplyer) *[]int64
- func RestInt64sVar(register Register, p *[]int64, name string, options ...RestOptionApplyer) error
- func RestInt8s(register Register, name string, options ...RestOptionApplyer) *[]int8
- func RestInt8sVar(register Register, p *[]int8, name string, options ...RestOptionApplyer) error
- func RestInts(register Register, name string, options ...RestOptionApplyer) *[]int
- func RestIntsVar(register Register, p *[]int, name string, options ...RestOptionApplyer) error
- func RestStrings(register Register, name string, options ...RestOptionApplyer) *[]string
- func RestStringsVar(register Register, p *[]string, name string, options ...RestOptionApplyer) error
- func RestUint16s(register Register, name string, options ...RestOptionApplyer) *[]uint16
- func RestUint16sVar(register Register, p *[]uint16, name string, options ...RestOptionApplyer) error
- func RestUint32s(register Register, name string, options ...RestOptionApplyer) *[]uint32
- func RestUint32sVar(register Register, p *[]uint32, name string, options ...RestOptionApplyer) error
- func RestUint64s(register Register, name string, options ...RestOptionApplyer) *[]uint64
- func RestUint64sVar(register Register, p *[]uint64, name string, options ...RestOptionApplyer) error
- func RestUint8s(register Register, name string, options ...RestOptionApplyer) *[]uint8
- func RestUint8sVar(register Register, p *[]uint8, name string, options ...RestOptionApplyer) error
- func RestUints(register Register, name string, options ...RestOptionApplyer) *[]uint
- func RestUintsVar(register Register, p *[]uint, name string, options ...RestOptionApplyer) error
- func RestVar(register Register, value Value, name string, options ...RestOptionApplyer) error
- func String(register Register, name string, options ...FlagOptionApplyer) *string
- func StringArg(register Register, name string, options ...ArgOptionApplyer) *string
- func StringArgVar(register Register, p *string, name string, options ...ArgOptionApplyer) error
- func StringVar(register Register, p *string, name string, options ...FlagOptionApplyer) error
- func Strings(register Register, name string, options ...FlagOptionApplyer) *[]string
- func StringsVar(register Register, p *[]string, name string, options ...FlagOptionApplyer) error
- func Uint(register Register, name string, options ...FlagOptionApplyer) *uint
- func Uint16(register Register, name string, options ...FlagOptionApplyer) *uint16
- func Uint16Arg(register Register, name string, options ...ArgOptionApplyer) *uint16
- func Uint16ArgVar(register Register, p *uint16, name string, options ...ArgOptionApplyer) error
- func Uint16Var(register Register, p *uint16, name string, options ...FlagOptionApplyer) error
- func Uint16s(register Register, name string, options ...FlagOptionApplyer) *[]uint16
- func Uint16sVar(register Register, p *[]uint16, name string, options ...FlagOptionApplyer) error
- func Uint32(register Register, name string, options ...FlagOptionApplyer) *uint32
- func Uint32Arg(register Register, name string, options ...ArgOptionApplyer) *uint32
- func Uint32ArgVar(register Register, p *uint32, name string, options ...ArgOptionApplyer) error
- func Uint32Var(register Register, p *uint32, name string, options ...FlagOptionApplyer) error
- func Uint32s(register Register, name string, options ...FlagOptionApplyer) *[]uint32
- func Uint32sVar(register Register, p *[]uint32, name string, options ...FlagOptionApplyer) error
- func Uint64(register Register, name string, options ...FlagOptionApplyer) *uint64
- func Uint64Arg(register Register, name string, options ...ArgOptionApplyer) *uint64
- func Uint64ArgVar(register Register, p *uint64, name string, options ...ArgOptionApplyer) error
- func Uint64Var(register Register, p *uint64, name string, options ...FlagOptionApplyer) error
- func Uint64s(register Register, name string, options ...FlagOptionApplyer) *[]uint64
- func Uint64sVar(register Register, p *[]uint64, name string, options ...FlagOptionApplyer) error
- func Uint8(register Register, name string, options ...FlagOptionApplyer) *uint8
- func Uint8Arg(register Register, name string, options ...ArgOptionApplyer) *uint8
- func Uint8ArgVar(register Register, p *uint8, name string, options ...ArgOptionApplyer) error
- func Uint8Var(register Register, p *uint8, name string, options ...FlagOptionApplyer) error
- func Uint8s(register Register, name string, options ...FlagOptionApplyer) *[]uint8
- func Uint8sVar(register Register, p *[]uint8, name string, options ...FlagOptionApplyer) error
- func UintArg(register Register, name string, options ...ArgOptionApplyer) *uint
- func UintArgVar(register Register, p *uint, name string, options ...ArgOptionApplyer) error
- func UintVar(register Register, p *uint, name string, options ...FlagOptionApplyer) error
- func Uints(register Register, name string, options ...FlagOptionApplyer) *[]uint
- func UintsVar(register Register, p *[]uint, name string, options ...FlagOptionApplyer) error
- func Var(register Register, value Value, name string, options ...FlagOptionApplyer) error
- type Action
- type ActionBuilder
- type ActionRunner
- type App
- type Arg
- type ArgError
- type ArgOptionApplyer
- type ArgOptionFunc
- type ArgOptions
- type Command
- func (c *Command) App() *App
- func (c *Command) Arg(i int) (*Arg, bool)
- func (c *Command) Args() []Arg
- func (c *Command) Context() context.Context
- func (c *Command) Err() error
- func (c *Command) Flags() []Flag
- func (c *Command) LongFlag(name string) (*Flag, bool)
- func (c *Command) Parser() Parser
- func (c *Command) Path() []string
- func (c *Command) Print(a ...interface{}) (n int, err error)
- func (c *Command) Printf(format string, a ...interface{}) (n int, err error)
- func (c *Command) Println(a ...interface{}) (n int, err error)
- func (c *Command) RegisterArg(arg Arg) error
- func (c *Command) RegisterFlag(flag Flag) error
- func (c *Command) RegisterRestArgs(rest RestArgs) error
- func (c *Command) Rest() *RestArgs
- func (c *Command) ShortFlag(name string) (*Flag, bool)
- func (c *Command) Stderr() io.Writer
- func (c *Command) Stdin() io.Reader
- func (c *Command) Stdout() io.Writer
- func (c *Command) Warn(a ...interface{}) (n int, err error)
- func (c *Command) Warnf(format string, a ...interface{}) (n int, err error)
- func (c *Command) Warnln(a ...interface{}) (n int, err error)
- func (c *Command) WrapError(err error) error
- type CommandError
- type CommandFlag
- type Commander
- type CompletionDynamicValuer
- type CompletionGenerator
- type DefaultHelper
- type DefaultParser
- type DefaultRegister
- func (r *DefaultRegister) Arg(i int) (*Arg, bool)
- func (r *DefaultRegister) Args() []Arg
- func (r *DefaultRegister) Err() error
- func (r *DefaultRegister) Flags() []Flag
- func (r *DefaultRegister) LongFlag(name string) (*Flag, bool)
- func (r *DefaultRegister) RegisterArg(arg Arg) (err error)
- func (r *DefaultRegister) RegisterFlag(flag Flag) (err error)
- func (r *DefaultRegister) RegisterRestArgs(rest RestArgs) (err error)
- func (r *DefaultRegister) Rest() *RestArgs
- func (r *DefaultRegister) ShortFlag(name string) (*Flag, bool)
- type Emptier
- type ExitCode
- type Flag
- type FlagError
- type FlagOptionApplyer
- type FlagOptionFunc
- type FlagOptions
- type Getter
- type Helper
- type HelperFunc
- type InvalidCommandError
- type Necessary
- type NoopOption
- type ParseArgError
- type ParseFlagError
- type ParseValueError
- type Parser
- type Register
- type RestArgs
- type RestArgsError
- type RestOptionApplyer
- type RestOptionFunc
- type RestOptions
- type Typer
- type Usage
- type UsageOption
- type Usager
- type UsagerFunc
- type Value
- type ZSHCompletionGenerator
Constants ¶
This section is empty.
Variables ¶
var ( ErrDuplicate = errors.New("duplicate") ErrMissingName = errors.New("missing name") ErrInvalidName = errors.New("invalid name") ErrNotProvided = errors.New("not provided") ErrRequiredAfterOptional = errors.New("required after optional") ErrArgAfterRest = errors.New("arg after rest") ErrUnknown = errors.New("unknown") )
var ( ErrSyntax = errors.New("invalid syntax") ErrRange = errors.New("value out of range") )
Functions ¶
func ArgVar ¶
func ArgVar(register Register, value Value, name string, options ...ArgOptionApplyer) error
func Bool ¶
func Bool(register Register, name string, options ...FlagOptionApplyer) *bool
Bool defines a bool flag with specified name. The return value is the address of a bool variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Bool(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Bool(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Bool(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Bool(register, "name", cli.Required)
All options can be used together.
func BoolArg ¶
func BoolArg(register Register, name string, options ...ArgOptionApplyer) *bool
BoolArg defines a bool argument with specified name. The return value is the address of a bool variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.BoolArg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.BoolArg(register, "name", cli.Optional)
All options can be used together.
func BoolArgVar ¶
func BoolArgVar(register Register, p *bool, name string, options ...ArgOptionApplyer) error
BoolArgVar defines a bool argument with specified name. The argument p points to a bool variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.BoolArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.BoolArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func BoolVar ¶
func BoolVar(register Register, p *bool, name string, options ...FlagOptionApplyer) error
BoolVar defines a bool flag with specified name. The argument p points to a bool variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.BoolVar(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.BoolVar(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.BoolVar(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.BoolVar(register, &p, "name", cli.Required)
All options can be used together.
func Bools ¶
func Bools(register Register, name string, options ...FlagOptionApplyer) *[]bool
Bools defines a []bool flag with specified name. The return value is the address of a []bool variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Bools(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Bools(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Bools(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Bools(register, "names", cli.Required)
All options can be used together.
func BoolsVar ¶
func BoolsVar(register Register, p *[]bool, name string, options ...FlagOptionApplyer) error
BoolsVar defines a []bool flag with specified name. The argument p points to a []bool variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.BoolsVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.BoolsVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.BoolsVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.BoolsVar(register, &p, "names", cli.Required)
All options can be used together.
func Duration ¶
func Duration(register Register, name string, options ...FlagOptionApplyer) *time.Duration
Duration defines a time.Duration flag with specified name. The return value is the address of a time.Duration variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Duration(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Duration(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Duration(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Duration(register, "name", cli.Required)
All options can be used together.
func DurationArg ¶
func DurationArg(register Register, name string, options ...ArgOptionApplyer) *time.Duration
DurationArg defines a time.Duration argument with specified name. The return value is the address of a time.Duration variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.DurationArg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.DurationArg(register, "name", cli.Optional)
All options can be used together.
func DurationArgVar ¶
func DurationArgVar(register Register, p *time.Duration, name string, options ...ArgOptionApplyer) error
DurationArgVar defines a time.Duration argument with specified name. The argument p points to a time.Duration variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.DurationArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.DurationArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func DurationVar ¶
func DurationVar(register Register, p *time.Duration, name string, options ...FlagOptionApplyer) error
DurationVar defines a time.Duration flag with specified name. The argument p points to a time.Duration variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.DurationVar(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.DurationVar(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.DurationVar(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.DurationVar(register, &p, "name", cli.Required)
All options can be used together.
func Durations ¶
func Durations(register Register, name string, options ...FlagOptionApplyer) *[]time.Duration
Durations defines a []time.Duration flag with specified name. The return value is the address of a []time.Duration variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Durations(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Durations(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Durations(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Durations(register, "names", cli.Required)
All options can be used together.
func DurationsVar ¶
func DurationsVar(register Register, p *[]time.Duration, name string, options ...FlagOptionApplyer) error
DurationsVar defines a []time.Duration flag with specified name. The argument p points to a []time.Duration variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.DurationsVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.DurationsVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.DurationsVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.DurationsVar(register, &p, "names", cli.Required)
All options can be used together.
func Float32 ¶
func Float32(register Register, name string, options ...FlagOptionApplyer) *float32
Float32 defines a float32 flag with specified name. The return value is the address of a float32 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float32(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float32(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Float32(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float32(register, "name", cli.Required)
All options can be used together.
func Float32Arg ¶
func Float32Arg(register Register, name string, options ...ArgOptionApplyer) *float32
Float32Arg defines a float32 argument with specified name. The return value is the address of a float32 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Float32Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Float32Arg(register, "name", cli.Optional)
All options can be used together.
func Float32ArgVar ¶
func Float32ArgVar(register Register, p *float32, name string, options ...ArgOptionApplyer) error
Float32ArgVar defines a float32 argument with specified name. The argument p points to a float32 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Float32ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Float32ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Float32Var ¶
func Float32Var(register Register, p *float32, name string, options ...FlagOptionApplyer) error
Float32Var defines a float32 flag with specified name. The argument p points to a float32 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float32Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float32Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Float32Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float32Var(register, &p, "name", cli.Required)
All options can be used together.
func Float32s ¶
func Float32s(register Register, name string, options ...FlagOptionApplyer) *[]float32
Float32s defines a []float32 flag with specified name. The return value is the address of a []float32 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float32s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float32s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Float32s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float32s(register, "names", cli.Required)
All options can be used together.
func Float32sVar ¶
func Float32sVar(register Register, p *[]float32, name string, options ...FlagOptionApplyer) error
Float32sVar defines a []float32 flag with specified name. The argument p points to a []float32 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float32sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float32sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Float32sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float32sVar(register, &p, "names", cli.Required)
All options can be used together.
func Float64 ¶
func Float64(register Register, name string, options ...FlagOptionApplyer) *float64
Float64 defines a float64 flag with specified name. The return value is the address of a float64 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float64(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float64(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Float64(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float64(register, "name", cli.Required)
All options can be used together.
func Float64Arg ¶
func Float64Arg(register Register, name string, options ...ArgOptionApplyer) *float64
Float64Arg defines a float64 argument with specified name. The return value is the address of a float64 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Float64Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Float64Arg(register, "name", cli.Optional)
All options can be used together.
func Float64ArgVar ¶
func Float64ArgVar(register Register, p *float64, name string, options ...ArgOptionApplyer) error
Float64ArgVar defines a float64 argument with specified name. The argument p points to a float64 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Float64ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Float64ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Float64Var ¶
func Float64Var(register Register, p *float64, name string, options ...FlagOptionApplyer) error
Float64Var defines a float64 flag with specified name. The argument p points to a float64 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float64Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float64Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Float64Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float64Var(register, &p, "name", cli.Required)
All options can be used together.
func Float64s ¶
func Float64s(register Register, name string, options ...FlagOptionApplyer) *[]float64
Float64s defines a []float64 flag with specified name. The return value is the address of a []float64 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float64s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float64s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Float64s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float64s(register, "names", cli.Required)
All options can be used together.
func Float64sVar ¶
func Float64sVar(register Register, p *[]float64, name string, options ...FlagOptionApplyer) error
Float64sVar defines a []float64 flag with specified name. The argument p points to a []float64 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Float64sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Float64sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Float64sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Float64sVar(register, &p, "names", cli.Required)
All options can be used together.
func Int ¶
func Int(register Register, name string, options ...FlagOptionApplyer) *int
Int defines a int flag with specified name. The return value is the address of a int variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int(register, "name", cli.Required)
All options can be used together.
func Int16 ¶
func Int16(register Register, name string, options ...FlagOptionApplyer) *int16
Int16 defines a int16 flag with specified name. The return value is the address of a int16 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int16(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int16(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int16(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int16(register, "name", cli.Required)
All options can be used together.
func Int16Arg ¶
func Int16Arg(register Register, name string, options ...ArgOptionApplyer) *int16
Int16Arg defines a int16 argument with specified name. The return value is the address of a int16 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int16Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int16Arg(register, "name", cli.Optional)
All options can be used together.
func Int16ArgVar ¶
func Int16ArgVar(register Register, p *int16, name string, options ...ArgOptionApplyer) error
Int16ArgVar defines a int16 argument with specified name. The argument p points to a int16 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int16ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int16ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Int16Var ¶
func Int16Var(register Register, p *int16, name string, options ...FlagOptionApplyer) error
Int16Var defines a int16 flag with specified name. The argument p points to a int16 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int16Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int16Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int16Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int16Var(register, &p, "name", cli.Required)
All options can be used together.
func Int16s ¶
func Int16s(register Register, name string, options ...FlagOptionApplyer) *[]int16
Int16s defines a []int16 flag with specified name. The return value is the address of a []int16 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int16s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int16s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int16s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int16s(register, "names", cli.Required)
All options can be used together.
func Int16sVar ¶
func Int16sVar(register Register, p *[]int16, name string, options ...FlagOptionApplyer) error
Int16sVar defines a []int16 flag with specified name. The argument p points to a []int16 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int16sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int16sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int16sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int16sVar(register, &p, "names", cli.Required)
All options can be used together.
func Int32 ¶
func Int32(register Register, name string, options ...FlagOptionApplyer) *int32
Int32 defines a int32 flag with specified name. The return value is the address of a int32 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int32(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int32(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int32(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int32(register, "name", cli.Required)
All options can be used together.
func Int32Arg ¶
func Int32Arg(register Register, name string, options ...ArgOptionApplyer) *int32
Int32Arg defines a int32 argument with specified name. The return value is the address of a int32 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int32Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int32Arg(register, "name", cli.Optional)
All options can be used together.
func Int32ArgVar ¶
func Int32ArgVar(register Register, p *int32, name string, options ...ArgOptionApplyer) error
Int32ArgVar defines a int32 argument with specified name. The argument p points to a int32 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int32ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int32ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Int32Var ¶
func Int32Var(register Register, p *int32, name string, options ...FlagOptionApplyer) error
Int32Var defines a int32 flag with specified name. The argument p points to a int32 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int32Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int32Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int32Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int32Var(register, &p, "name", cli.Required)
All options can be used together.
func Int32s ¶
func Int32s(register Register, name string, options ...FlagOptionApplyer) *[]int32
Int32s defines a []int32 flag with specified name. The return value is the address of a []int32 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int32s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int32s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int32s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int32s(register, "names", cli.Required)
All options can be used together.
func Int32sVar ¶
func Int32sVar(register Register, p *[]int32, name string, options ...FlagOptionApplyer) error
Int32sVar defines a []int32 flag with specified name. The argument p points to a []int32 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int32sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int32sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int32sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int32sVar(register, &p, "names", cli.Required)
All options can be used together.
func Int64 ¶
func Int64(register Register, name string, options ...FlagOptionApplyer) *int64
Int64 defines a int64 flag with specified name. The return value is the address of a int64 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int64(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int64(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int64(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int64(register, "name", cli.Required)
All options can be used together.
func Int64Arg ¶
func Int64Arg(register Register, name string, options ...ArgOptionApplyer) *int64
Int64Arg defines a int64 argument with specified name. The return value is the address of a int64 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int64Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int64Arg(register, "name", cli.Optional)
All options can be used together.
func Int64ArgVar ¶
func Int64ArgVar(register Register, p *int64, name string, options ...ArgOptionApplyer) error
Int64ArgVar defines a int64 argument with specified name. The argument p points to a int64 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int64ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int64ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Int64Var ¶
func Int64Var(register Register, p *int64, name string, options ...FlagOptionApplyer) error
Int64Var defines a int64 flag with specified name. The argument p points to a int64 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int64Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int64Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int64Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int64Var(register, &p, "name", cli.Required)
All options can be used together.
func Int64s ¶
func Int64s(register Register, name string, options ...FlagOptionApplyer) *[]int64
Int64s defines a []int64 flag with specified name. The return value is the address of a []int64 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int64s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int64s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int64s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int64s(register, "names", cli.Required)
All options can be used together.
func Int64sVar ¶
func Int64sVar(register Register, p *[]int64, name string, options ...FlagOptionApplyer) error
Int64sVar defines a []int64 flag with specified name. The argument p points to a []int64 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int64sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int64sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int64sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int64sVar(register, &p, "names", cli.Required)
All options can be used together.
func Int8 ¶
func Int8(register Register, name string, options ...FlagOptionApplyer) *int8
Int8 defines a int8 flag with specified name. The return value is the address of a int8 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int8(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int8(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int8(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int8(register, "name", cli.Required)
All options can be used together.
func Int8Arg ¶
func Int8Arg(register Register, name string, options ...ArgOptionApplyer) *int8
Int8Arg defines a int8 argument with specified name. The return value is the address of a int8 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int8Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int8Arg(register, "name", cli.Optional)
All options can be used together.
func Int8ArgVar ¶
func Int8ArgVar(register Register, p *int8, name string, options ...ArgOptionApplyer) error
Int8ArgVar defines a int8 argument with specified name. The argument p points to a int8 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Int8ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Int8ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Int8Var ¶
func Int8Var(register Register, p *int8, name string, options ...FlagOptionApplyer) error
Int8Var defines a int8 flag with specified name. The argument p points to a int8 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int8Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int8Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Int8Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int8Var(register, &p, "name", cli.Required)
All options can be used together.
func Int8s ¶
func Int8s(register Register, name string, options ...FlagOptionApplyer) *[]int8
Int8s defines a []int8 flag with specified name. The return value is the address of a []int8 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int8s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int8s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int8s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int8s(register, "names", cli.Required)
All options can be used together.
func Int8sVar ¶
func Int8sVar(register Register, p *[]int8, name string, options ...FlagOptionApplyer) error
Int8sVar defines a []int8 flag with specified name. The argument p points to a []int8 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Int8sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Int8sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Int8sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Int8sVar(register, &p, "names", cli.Required)
All options can be used together.
func IntArg ¶
func IntArg(register Register, name string, options ...ArgOptionApplyer) *int
IntArg defines a int argument with specified name. The return value is the address of a int variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.IntArg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.IntArg(register, "name", cli.Optional)
All options can be used together.
func IntArgVar ¶
func IntArgVar(register Register, p *int, name string, options ...ArgOptionApplyer) error
IntArgVar defines a int argument with specified name. The argument p points to a int variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.IntArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.IntArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func IntVar ¶
func IntVar(register Register, p *int, name string, options ...FlagOptionApplyer) error
IntVar defines a int flag with specified name. The argument p points to a int variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.IntVar(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.IntVar(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.IntVar(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.IntVar(register, &p, "name", cli.Required)
All options can be used together.
func Ints ¶
func Ints(register Register, name string, options ...FlagOptionApplyer) *[]int
Ints defines a []int flag with specified name. The return value is the address of a []int variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Ints(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Ints(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Ints(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Ints(register, "names", cli.Required)
All options can be used together.
func IntsVar ¶
func IntsVar(register Register, p *[]int, name string, options ...FlagOptionApplyer) error
IntsVar defines a []int flag with specified name. The argument p points to a []int variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.IntsVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.IntsVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.IntsVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.IntsVar(register, &p, "names", cli.Required)
All options can be used together.
func RestBools ¶
func RestBools(register Register, name string, options ...RestOptionApplyer) *[]bool
RestBools defines the []bool rest arguments with specified name. The return value is the address of a []bool variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestBools(register, "names", cli.Usage("Names of users"))
func RestBoolsVar ¶
func RestBoolsVar(register Register, p *[]bool, name string, options ...RestOptionApplyer) error
RestBoolsVar defines the []bool rest arguments with specified name. The argument p points to a []bool variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestBoolsVar(register, &p, "names", cli.Usage("Names of users"))
func RestDurations ¶
func RestDurations(register Register, name string, options ...RestOptionApplyer) *[]time.Duration
RestDurations defines the []time.Duration rest arguments with specified name. The return value is the address of a []time.Duration variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestDurations(register, "names", cli.Usage("Names of users"))
func RestDurationsVar ¶
func RestDurationsVar(register Register, p *[]time.Duration, name string, options ...RestOptionApplyer) error
RestDurationsVar defines the []time.Duration rest arguments with specified name. The argument p points to a []time.Duration variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestDurationsVar(register, &p, "names", cli.Usage("Names of users"))
func RestFloat32s ¶
func RestFloat32s(register Register, name string, options ...RestOptionApplyer) *[]float32
RestFloat32s defines the []float32 rest arguments with specified name. The return value is the address of a []float32 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestFloat32s(register, "names", cli.Usage("Names of users"))
func RestFloat32sVar ¶
func RestFloat32sVar(register Register, p *[]float32, name string, options ...RestOptionApplyer) error
RestFloat32sVar defines the []float32 rest arguments with specified name. The argument p points to a []float32 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestFloat32sVar(register, &p, "names", cli.Usage("Names of users"))
func RestFloat64s ¶
func RestFloat64s(register Register, name string, options ...RestOptionApplyer) *[]float64
RestFloat64s defines the []float64 rest arguments with specified name. The return value is the address of a []float64 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestFloat64s(register, "names", cli.Usage("Names of users"))
func RestFloat64sVar ¶
func RestFloat64sVar(register Register, p *[]float64, name string, options ...RestOptionApplyer) error
RestFloat64sVar defines the []float64 rest arguments with specified name. The argument p points to a []float64 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestFloat64sVar(register, &p, "names", cli.Usage("Names of users"))
func RestInt16s ¶
func RestInt16s(register Register, name string, options ...RestOptionApplyer) *[]int16
RestInt16s defines the []int16 rest arguments with specified name. The return value is the address of a []int16 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt16s(register, "names", cli.Usage("Names of users"))
func RestInt16sVar ¶
func RestInt16sVar(register Register, p *[]int16, name string, options ...RestOptionApplyer) error
RestInt16sVar defines the []int16 rest arguments with specified name. The argument p points to a []int16 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt16sVar(register, &p, "names", cli.Usage("Names of users"))
func RestInt32s ¶
func RestInt32s(register Register, name string, options ...RestOptionApplyer) *[]int32
RestInt32s defines the []int32 rest arguments with specified name. The return value is the address of a []int32 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt32s(register, "names", cli.Usage("Names of users"))
func RestInt32sVar ¶
func RestInt32sVar(register Register, p *[]int32, name string, options ...RestOptionApplyer) error
RestInt32sVar defines the []int32 rest arguments with specified name. The argument p points to a []int32 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt32sVar(register, &p, "names", cli.Usage("Names of users"))
func RestInt64s ¶
func RestInt64s(register Register, name string, options ...RestOptionApplyer) *[]int64
RestInt64s defines the []int64 rest arguments with specified name. The return value is the address of a []int64 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt64s(register, "names", cli.Usage("Names of users"))
func RestInt64sVar ¶
func RestInt64sVar(register Register, p *[]int64, name string, options ...RestOptionApplyer) error
RestInt64sVar defines the []int64 rest arguments with specified name. The argument p points to a []int64 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt64sVar(register, &p, "names", cli.Usage("Names of users"))
func RestInt8s ¶
func RestInt8s(register Register, name string, options ...RestOptionApplyer) *[]int8
RestInt8s defines the []int8 rest arguments with specified name. The return value is the address of a []int8 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt8s(register, "names", cli.Usage("Names of users"))
func RestInt8sVar ¶
func RestInt8sVar(register Register, p *[]int8, name string, options ...RestOptionApplyer) error
RestInt8sVar defines the []int8 rest arguments with specified name. The argument p points to a []int8 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInt8sVar(register, &p, "names", cli.Usage("Names of users"))
func RestInts ¶
func RestInts(register Register, name string, options ...RestOptionApplyer) *[]int
RestInts defines the []int rest arguments with specified name. The return value is the address of a []int variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestInts(register, "names", cli.Usage("Names of users"))
func RestIntsVar ¶
func RestIntsVar(register Register, p *[]int, name string, options ...RestOptionApplyer) error
RestIntsVar defines the []int rest arguments with specified name. The argument p points to a []int variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestIntsVar(register, &p, "names", cli.Usage("Names of users"))
func RestStrings ¶
func RestStrings(register Register, name string, options ...RestOptionApplyer) *[]string
RestStrings defines the []string rest arguments with specified name. The return value is the address of a []string variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestStrings(register, "names", cli.Usage("Names of users"))
func RestStringsVar ¶
func RestStringsVar(register Register, p *[]string, name string, options ...RestOptionApplyer) error
RestStringsVar defines the []string rest arguments with specified name. The argument p points to a []string variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestStringsVar(register, &p, "names", cli.Usage("Names of users"))
func RestUint16s ¶
func RestUint16s(register Register, name string, options ...RestOptionApplyer) *[]uint16
RestUint16s defines the []uint16 rest arguments with specified name. The return value is the address of a []uint16 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint16s(register, "names", cli.Usage("Names of users"))
func RestUint16sVar ¶
func RestUint16sVar(register Register, p *[]uint16, name string, options ...RestOptionApplyer) error
RestUint16sVar defines the []uint16 rest arguments with specified name. The argument p points to a []uint16 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint16sVar(register, &p, "names", cli.Usage("Names of users"))
func RestUint32s ¶
func RestUint32s(register Register, name string, options ...RestOptionApplyer) *[]uint32
RestUint32s defines the []uint32 rest arguments with specified name. The return value is the address of a []uint32 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint32s(register, "names", cli.Usage("Names of users"))
func RestUint32sVar ¶
func RestUint32sVar(register Register, p *[]uint32, name string, options ...RestOptionApplyer) error
RestUint32sVar defines the []uint32 rest arguments with specified name. The argument p points to a []uint32 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint32sVar(register, &p, "names", cli.Usage("Names of users"))
func RestUint64s ¶
func RestUint64s(register Register, name string, options ...RestOptionApplyer) *[]uint64
RestUint64s defines the []uint64 rest arguments with specified name. The return value is the address of a []uint64 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint64s(register, "names", cli.Usage("Names of users"))
func RestUint64sVar ¶
func RestUint64sVar(register Register, p *[]uint64, name string, options ...RestOptionApplyer) error
RestUint64sVar defines the []uint64 rest arguments with specified name. The argument p points to a []uint64 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint64sVar(register, &p, "names", cli.Usage("Names of users"))
func RestUint8s ¶
func RestUint8s(register Register, name string, options ...RestOptionApplyer) *[]uint8
RestUint8s defines the []uint8 rest arguments with specified name. The return value is the address of a []uint8 variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint8s(register, "names", cli.Usage("Names of users"))
func RestUint8sVar ¶
func RestUint8sVar(register Register, p *[]uint8, name string, options ...RestOptionApplyer) error
RestUint8sVar defines the []uint8 rest arguments with specified name. The argument p points to a []uint8 variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUint8sVar(register, &p, "names", cli.Usage("Names of users"))
func RestUints ¶
func RestUints(register Register, name string, options ...RestOptionApplyer) *[]uint
RestUints defines the []uint rest arguments with specified name. The return value is the address of a []uint variable that stores values of arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUints(register, "names", cli.Usage("Names of users"))
func RestUintsVar ¶
func RestUintsVar(register Register, p *[]uint, name string, options ...RestOptionApplyer) error
RestUintsVar defines the []uint rest arguments with specified name. The argument p points to a []uint variable in which to store values of arguments. The return value will be an error from the register.RegisterRestArgs if it failed to register the rest arguments.
A usage may be set by passing a cli.Usage.
_ = cli.RestUintsVar(register, &p, "names", cli.Usage("Names of users"))
func RestVar ¶
func RestVar(register Register, value Value, name string, options ...RestOptionApplyer) error
func String ¶
func String(register Register, name string, options ...FlagOptionApplyer) *string
String defines a string flag with specified name. The return value is the address of a string variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.String(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.String(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.String(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.String(register, "name", cli.Required)
All options can be used together.
func StringArg ¶
func StringArg(register Register, name string, options ...ArgOptionApplyer) *string
StringArg defines a string argument with specified name. The return value is the address of a string variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.StringArg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.StringArg(register, "name", cli.Optional)
All options can be used together.
func StringArgVar ¶
func StringArgVar(register Register, p *string, name string, options ...ArgOptionApplyer) error
StringArgVar defines a string argument with specified name. The argument p points to a string variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.StringArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.StringArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func StringVar ¶
func StringVar(register Register, p *string, name string, options ...FlagOptionApplyer) error
StringVar defines a string flag with specified name. The argument p points to a string variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.StringVar(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.StringVar(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.StringVar(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.StringVar(register, &p, "name", cli.Required)
All options can be used together.
func Strings ¶
func Strings(register Register, name string, options ...FlagOptionApplyer) *[]string
Strings defines a []string flag with specified name. The return value is the address of a []string variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Strings(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Strings(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Strings(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Strings(register, "names", cli.Required)
All options can be used together.
func StringsVar ¶
func StringsVar(register Register, p *[]string, name string, options ...FlagOptionApplyer) error
StringsVar defines a []string flag with specified name. The argument p points to a []string variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.StringsVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.StringsVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.StringsVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.StringsVar(register, &p, "names", cli.Required)
All options can be used together.
func Uint ¶
func Uint(register Register, name string, options ...FlagOptionApplyer) *uint
Uint defines a uint flag with specified name. The return value is the address of a uint variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint(register, "name", cli.Required)
All options can be used together.
func Uint16 ¶
func Uint16(register Register, name string, options ...FlagOptionApplyer) *uint16
Uint16 defines a uint16 flag with specified name. The return value is the address of a uint16 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint16(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint16(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint16(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint16(register, "name", cli.Required)
All options can be used together.
func Uint16Arg ¶
func Uint16Arg(register Register, name string, options ...ArgOptionApplyer) *uint16
Uint16Arg defines a uint16 argument with specified name. The return value is the address of a uint16 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint16Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint16Arg(register, "name", cli.Optional)
All options can be used together.
func Uint16ArgVar ¶
func Uint16ArgVar(register Register, p *uint16, name string, options ...ArgOptionApplyer) error
Uint16ArgVar defines a uint16 argument with specified name. The argument p points to a uint16 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint16ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint16ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Uint16Var ¶
func Uint16Var(register Register, p *uint16, name string, options ...FlagOptionApplyer) error
Uint16Var defines a uint16 flag with specified name. The argument p points to a uint16 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint16Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint16Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint16Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint16Var(register, &p, "name", cli.Required)
All options can be used together.
func Uint16s ¶
func Uint16s(register Register, name string, options ...FlagOptionApplyer) *[]uint16
Uint16s defines a []uint16 flag with specified name. The return value is the address of a []uint16 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint16s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint16s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint16s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint16s(register, "names", cli.Required)
All options can be used together.
func Uint16sVar ¶
func Uint16sVar(register Register, p *[]uint16, name string, options ...FlagOptionApplyer) error
Uint16sVar defines a []uint16 flag with specified name. The argument p points to a []uint16 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint16sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint16sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint16sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint16sVar(register, &p, "names", cli.Required)
All options can be used together.
func Uint32 ¶
func Uint32(register Register, name string, options ...FlagOptionApplyer) *uint32
Uint32 defines a uint32 flag with specified name. The return value is the address of a uint32 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint32(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint32(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint32(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint32(register, "name", cli.Required)
All options can be used together.
func Uint32Arg ¶
func Uint32Arg(register Register, name string, options ...ArgOptionApplyer) *uint32
Uint32Arg defines a uint32 argument with specified name. The return value is the address of a uint32 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint32Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint32Arg(register, "name", cli.Optional)
All options can be used together.
func Uint32ArgVar ¶
func Uint32ArgVar(register Register, p *uint32, name string, options ...ArgOptionApplyer) error
Uint32ArgVar defines a uint32 argument with specified name. The argument p points to a uint32 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint32ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint32ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Uint32Var ¶
func Uint32Var(register Register, p *uint32, name string, options ...FlagOptionApplyer) error
Uint32Var defines a uint32 flag with specified name. The argument p points to a uint32 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint32Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint32Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint32Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint32Var(register, &p, "name", cli.Required)
All options can be used together.
func Uint32s ¶
func Uint32s(register Register, name string, options ...FlagOptionApplyer) *[]uint32
Uint32s defines a []uint32 flag with specified name. The return value is the address of a []uint32 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint32s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint32s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint32s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint32s(register, "names", cli.Required)
All options can be used together.
func Uint32sVar ¶
func Uint32sVar(register Register, p *[]uint32, name string, options ...FlagOptionApplyer) error
Uint32sVar defines a []uint32 flag with specified name. The argument p points to a []uint32 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint32sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint32sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint32sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint32sVar(register, &p, "names", cli.Required)
All options can be used together.
func Uint64 ¶
func Uint64(register Register, name string, options ...FlagOptionApplyer) *uint64
Uint64 defines a uint64 flag with specified name. The return value is the address of a uint64 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint64(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint64(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint64(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint64(register, "name", cli.Required)
All options can be used together.
func Uint64Arg ¶
func Uint64Arg(register Register, name string, options ...ArgOptionApplyer) *uint64
Uint64Arg defines a uint64 argument with specified name. The return value is the address of a uint64 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint64Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint64Arg(register, "name", cli.Optional)
All options can be used together.
func Uint64ArgVar ¶
func Uint64ArgVar(register Register, p *uint64, name string, options ...ArgOptionApplyer) error
Uint64ArgVar defines a uint64 argument with specified name. The argument p points to a uint64 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint64ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint64ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Uint64Var ¶
func Uint64Var(register Register, p *uint64, name string, options ...FlagOptionApplyer) error
Uint64Var defines a uint64 flag with specified name. The argument p points to a uint64 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint64Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint64Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint64Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint64Var(register, &p, "name", cli.Required)
All options can be used together.
func Uint64s ¶
func Uint64s(register Register, name string, options ...FlagOptionApplyer) *[]uint64
Uint64s defines a []uint64 flag with specified name. The return value is the address of a []uint64 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint64s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint64s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint64s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint64s(register, "names", cli.Required)
All options can be used together.
func Uint64sVar ¶
func Uint64sVar(register Register, p *[]uint64, name string, options ...FlagOptionApplyer) error
Uint64sVar defines a []uint64 flag with specified name. The argument p points to a []uint64 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint64sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint64sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint64sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint64sVar(register, &p, "names", cli.Required)
All options can be used together.
func Uint8 ¶
func Uint8(register Register, name string, options ...FlagOptionApplyer) *uint8
Uint8 defines a uint8 flag with specified name. The return value is the address of a uint8 variable that stores the value of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint8(register, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint8(register, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint8(register, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint8(register, "name", cli.Required)
All options can be used together.
func Uint8Arg ¶
func Uint8Arg(register Register, name string, options ...ArgOptionApplyer) *uint8
Uint8Arg defines a uint8 argument with specified name. The return value is the address of a uint8 variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint8Arg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint8Arg(register, "name", cli.Optional)
All options can be used together.
func Uint8ArgVar ¶
func Uint8ArgVar(register Register, p *uint8, name string, options ...ArgOptionApplyer) error
Uint8ArgVar defines a uint8 argument with specified name. The argument p points to a uint8 variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.Uint8ArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.Uint8ArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func Uint8Var ¶
func Uint8Var(register Register, p *uint8, name string, options ...FlagOptionApplyer) error
Uint8Var defines a uint8 flag with specified name. The argument p points to a uint8 variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint8Var(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint8Var(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint8Var(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint8Var(register, &p, "name", cli.Required)
All options can be used together.
func Uint8s ¶
func Uint8s(register Register, name string, options ...FlagOptionApplyer) *[]uint8
Uint8s defines a []uint8 flag with specified name. The return value is the address of a []uint8 variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint8s(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint8s(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint8s(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint8s(register, "names", cli.Required)
All options can be used together.
func Uint8sVar ¶
func Uint8sVar(register Register, p *[]uint8, name string, options ...FlagOptionApplyer) error
Uint8sVar defines a []uint8 flag with specified name. The argument p points to a []uint8 variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uint8sVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uint8sVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uint8sVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uint8sVar(register, &p, "names", cli.Required)
All options can be used together.
func UintArg ¶
func UintArg(register Register, name string, options ...ArgOptionApplyer) *uint
UintArg defines a uint argument with specified name. The return value is the address of a uint variable that stores the value of the argument.
A usage may be set by passing a cli.Usage.
_ = cli.UintArg(register, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.UintArg(register, "name", cli.Optional)
All options can be used together.
func UintArgVar ¶
func UintArgVar(register Register, p *uint, name string, options ...ArgOptionApplyer) error
UintArgVar defines a uint argument with specified name. The argument p points to a uint variable in which to store the value of the argument. The return value will be an error from the register.RegisterArg if it failed to register the argument.
A usage may be set by passing a cli.Usage.
_ = cli.UintArgVar(register, &p, "name", cli.Usage("The name of user"))
The argument is required by default. This may be changed by passing the cli.Optional.
_ = cli.UintArgVar(register, &p, "name", cli.Optional)
All options can be used together.
func UintVar ¶
func UintVar(register Register, p *uint, name string, options ...FlagOptionApplyer) error
UintVar defines a uint flag with specified name. The argument p points to a uint variable in which to store the value of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.UintVar(register, &p, "name", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.UintVar(register, &p, "n", cli.WithLong("name"))
A usage may be set by passing a cli.Usage.
_ = cli.UintVar(register, &p, "name", cli.Usage("The name of user"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.UintVar(register, &p, "name", cli.Required)
All options can be used together.
func Uints ¶
func Uints(register Register, name string, options ...FlagOptionApplyer) *[]uint
Uints defines a []uint flag with specified name. The return value is the address of a []uint variable that stores values of the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.Uints(register, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.Uints(register, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.Uints(register, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.Uints(register, "names", cli.Required)
All options can be used together.
func UintsVar ¶
func UintsVar(register Register, p *[]uint, name string, options ...FlagOptionApplyer) error
UintsVar defines a []uint flag with specified name. The argument p points to a []uint variable in which to store values of the flag. The return value will be an error from the register.RegisterFlag if it failed to register the flag.
If a name contains only one rune, it will be a short name, otherwise a long name. To set a short name, you pass a cli.WithShort.
_ = cli.UintsVar(register, &p, "names", cli.WithShort("n"))
To set a long name, you pass a cli.WithLong.
_ = cli.UintsVar(register, &p, "n", cli.WithLong("names"))
A usage may be set by passing a cli.Usage.
_ = cli.UintsVar(register, &p, "names", cli.Usage("Names of users"))
The flag is optional by default. This may be changed by passing the cli.Required.
_ = cli.UintsVar(register, &p, "names", cli.Required)
All options can be used together.
Types ¶
type Action ¶
func ActionFunc ¶
func ActionFunc(fn ActionBuilder) Action
type ActionBuilder ¶
type ActionBuilder func(cmd *Command) ActionRunner
type ActionRunner ¶
func (ActionRunner) Run ¶
func (fn ActionRunner) Run(cmd *Command) error
func (ActionRunner) Setup ¶
func (fn ActionRunner) Setup(cmd *Command) error
type App ¶
type App struct { Name string Usage Usager Action Action CommandFlags []CommandFlag Commands []Command Args []string Stdout io.Writer Stderr io.Writer Stdin io.Reader Parser Parser NewRegister func() Register Helper Helper // contains filtered or unexported fields }
func (*App) HandleError ¶
type Arg ¶
type Arg struct { Value Value Name string Usage Usager Necessary Necessary // contains filtered or unexported fields }
func (*Arg) SaveDefault ¶
func (a *Arg) SaveDefault()
type ArgOptionApplyer ¶
type ArgOptionApplyer interface {
ArgOptionApply(*ArgOptions)
}
type ArgOptionFunc ¶
type ArgOptionFunc func(*ArgOptions)
func (ArgOptionFunc) ArgOptionApply ¶
func (fn ArgOptionFunc) ArgOptionApply(o *ArgOptions)
type ArgOptions ¶
type ArgOptions struct { Value Value Name string Usage Usager Necessary Necessary // Required if unset }
func (ArgOptions) ArgOptionApply ¶
func (o ArgOptions) ArgOptionApply(opts *ArgOptions)
type Command ¶
type Command struct { Name string Usage Usager Action Action CommandFlags []CommandFlag Commands []Command // contains filtered or unexported fields }
func CompletionCommand ¶
func CompletionCommand() Command
func HelpCommand ¶
func HelpCommand() Command
func (*Command) RegisterArg ¶
func (*Command) RegisterFlag ¶
func (*Command) RegisterRestArgs ¶
type CommandError ¶
func (*CommandError) Error ¶
func (e *CommandError) Error() string
func (*CommandError) ExitCode ¶
func (e *CommandError) ExitCode() ExitCode
func (*CommandError) Is ¶
func (e *CommandError) Is(err error) bool
func (*CommandError) Unwrap ¶
func (e *CommandError) Unwrap() error
type CommandFlag ¶
type CommandFlag struct { Short string Long string Usage Usager Action Action // contains filtered or unexported fields }
func HelpCommandFlag ¶
func HelpCommandFlag() CommandFlag
func VersionCommandFlag ¶
func VersionCommandFlag(version string) CommandFlag
type CompletionDynamicValuer ¶
type CompletionDynamicValuer interface { }
type CompletionGenerator ¶
type DefaultHelper ¶
type DefaultHelper struct{}
type DefaultParser ¶
type DefaultParser struct { Universal bool IgnoreUnknownFlags bool IgnoreUnknownArgs bool DisablePosixStyle bool DisableInlineValue bool }
func (*DefaultParser) FormatLongFlag ¶
func (p *DefaultParser) FormatLongFlag(name string) string
func (*DefaultParser) FormatShortFlag ¶
func (p *DefaultParser) FormatShortFlag(name string) string
type DefaultRegister ¶
type DefaultRegister struct {
// contains filtered or unexported fields
}
func (*DefaultRegister) Args ¶
func (r *DefaultRegister) Args() []Arg
func (*DefaultRegister) Err ¶
func (r *DefaultRegister) Err() error
func (*DefaultRegister) Flags ¶
func (r *DefaultRegister) Flags() []Flag
func (*DefaultRegister) RegisterArg ¶
func (r *DefaultRegister) RegisterArg(arg Arg) (err error)
func (*DefaultRegister) RegisterFlag ¶
func (r *DefaultRegister) RegisterFlag(flag Flag) (err error)
func (*DefaultRegister) RegisterRestArgs ¶
func (r *DefaultRegister) RegisterRestArgs(rest RestArgs) (err error)
func (*DefaultRegister) Rest ¶
func (r *DefaultRegister) Rest() *RestArgs
type Flag ¶
type Flag struct { Value Value Short string Long string Usage Usager Necessary Necessary // contains filtered or unexported fields }
func (*Flag) SaveDefault ¶
func (f *Flag) SaveDefault()
type FlagOptionApplyer ¶
type FlagOptionApplyer interface {
FlagOptionApply(*FlagOptions)
}
type FlagOptionFunc ¶
type FlagOptionFunc func(*FlagOptions)
func WithLong ¶
func WithLong(name string) FlagOptionFunc
func WithShort ¶
func WithShort(name string) FlagOptionFunc
func (FlagOptionFunc) FlagOptionApply ¶
func (fn FlagOptionFunc) FlagOptionApply(o *FlagOptions)
type FlagOptions ¶
type FlagOptions struct { Value Value Short string Long string Usage Usager Necessary Necessary // Optional if unset // contains filtered or unexported fields }
func (FlagOptions) FlagOptionApply ¶
func (o FlagOptions) FlagOptionApply(opts *FlagOptions)
type Helper ¶
func DisableHelp ¶
func DisableHelp() Helper
type HelperFunc ¶
type InvalidCommandError ¶
func (*InvalidCommandError) Error ¶
func (e *InvalidCommandError) Error() string
func (*InvalidCommandError) Is ¶
func (e *InvalidCommandError) Is(err error) bool
type Necessary ¶
type Necessary uint8
const ( Optional Necessary Required )
func (Necessary) ArgOptionApply ¶
func (opt Necessary) ArgOptionApply(o *ArgOptions)
func (Necessary) FlagOptionApply ¶
func (opt Necessary) FlagOptionApply(o *FlagOptions)
type NoopOption ¶
type NoopOption struct{}
func WithNoop ¶
func WithNoop() NoopOption
func (NoopOption) ArgOptionApply ¶
func (opt NoopOption) ArgOptionApply(o *ArgOptions)
func (NoopOption) FlagOptionApply ¶
func (opt NoopOption) FlagOptionApply(o *FlagOptions)
func (NoopOption) RestOptionApply ¶
func (opt NoopOption) RestOptionApply(o *RestOptions)
type ParseArgError ¶
func (*ParseArgError) Error ¶
func (e *ParseArgError) Error() string
func (*ParseArgError) Is ¶
func (e *ParseArgError) Is(err error) bool
func (*ParseArgError) Unwrap ¶
func (e *ParseArgError) Unwrap() error
type ParseFlagError ¶
func (*ParseFlagError) Error ¶
func (e *ParseFlagError) Error() string
func (*ParseFlagError) Is ¶
func (e *ParseFlagError) Is(err error) bool
func (*ParseFlagError) Unwrap ¶
func (e *ParseFlagError) Unwrap() error
type ParseValueError ¶
func (*ParseValueError) Error ¶
func (e *ParseValueError) Error() string
func (*ParseValueError) Is ¶
func (e *ParseValueError) Is(err error) bool
func (*ParseValueError) Unwrap ¶
func (e *ParseValueError) Unwrap() error
type RestArgs ¶
type RestArgs struct { Values Value Name string Usage Usager // contains filtered or unexported fields }
func (*RestArgs) SaveDefault ¶
func (ra *RestArgs) SaveDefault()
type RestArgsError ¶
func (*RestArgsError) Error ¶
func (e *RestArgsError) Error() string
func (*RestArgsError) Is ¶
func (e *RestArgsError) Is(err error) bool
type RestOptionApplyer ¶
type RestOptionApplyer interface {
RestOptionApply(*RestOptions)
}
type RestOptionFunc ¶
type RestOptionFunc func(*RestOptions)
func (RestOptionFunc) RestOptionApply ¶
func (fn RestOptionFunc) RestOptionApply(o *RestOptions)
type RestOptions ¶
func (RestOptions) RestOptionApply ¶
func (o RestOptions) RestOptionApply(opts *RestOptions)
type Usage ¶
type Usage string
func (Usage) ArgOptionApply ¶
func (s Usage) ArgOptionApply(o *ArgOptions)
func (Usage) FlagOptionApply ¶
func (s Usage) FlagOptionApply(o *FlagOptions)
func (Usage) RestOptionApply ¶
func (s Usage) RestOptionApply(o *RestOptions)
type UsageOption ¶
type UsageOption interface { FlagOptionApplyer ArgOptionApplyer RestOptionApplyer }
func WithUsage ¶
func WithUsage(u Usager) UsageOption
type UsagerFunc ¶
func (UsagerFunc) ArgOptionApply ¶
func (fn UsagerFunc) ArgOptionApply(o *ArgOptions)
func (UsagerFunc) FlagOptionApply ¶
func (fn UsagerFunc) FlagOptionApply(o *FlagOptions)
func (UsagerFunc) RestOptionApply ¶
func (fn UsagerFunc) RestOptionApply(o *RestOptions)
type ZSHCompletionGenerator ¶
type ZSHCompletionGenerator struct{}
func (*ZSHCompletionGenerator) CompletionGenerate ¶
func (g *ZSHCompletionGenerator) CompletionGenerate(cmd *Command, w io.Writer) error