Documentation
¶
Index ¶
- func DurationProvider(ctx *completion.ProviderCtx) []string
- func WithPrefix(name string) string
- type BoolFlag
- func (f BoolFlag) Default() interface{}
- func (f BoolFlag) DefaultStr() string
- func (f BoolFlag) DeprecationStr() string
- func (f BoolFlag) EnvVarStr() string
- func (f BoolFlag) FullNames() []string
- func (f BoolFlag) HasLeader() bool
- func (f BoolFlag) IsRequired() bool
- func (f BoolFlag) MainName() string
- func (f BoolFlag) Parse(str string) (interface{}, error)
- func (f BoolFlag) PlaceholderStr() string
- func (f BoolFlag) UsageStr() string
- type DurationFlag
- func (f DurationFlag) Default() interface{}
- func (f DurationFlag) DefaultStr() string
- func (f DurationFlag) DeprecationStr() string
- func (f DurationFlag) EnvVarStr() string
- func (f DurationFlag) FullNames() []string
- func (f DurationFlag) HasLeader() bool
- func (f DurationFlag) IsRequired() bool
- func (f DurationFlag) MainName() string
- func (f DurationFlag) Parse(str string) (interface{}, error)
- func (f DurationFlag) PlaceholderStr() string
- func (f DurationFlag) UsageStr() string
- type Flag
- type IntFlag
- func (f IntFlag) Default() interface{}
- func (f IntFlag) DefaultStr() string
- func (f IntFlag) DeprecationStr() string
- func (f IntFlag) EnvVarStr() string
- func (f IntFlag) FullNames() []string
- func (f IntFlag) HasLeader() bool
- func (f IntFlag) IsRequired() bool
- func (f IntFlag) MainName() string
- func (f IntFlag) Parse(str string) (interface{}, error)
- func (f IntFlag) PlaceholderStr() string
- func (f IntFlag) UsageStr() string
- type StringFlag
- func (f StringFlag) Default() interface{}
- func (f StringFlag) DefaultStr() string
- func (f StringFlag) DeprecationStr() string
- func (f StringFlag) EnvVarStr() string
- func (f StringFlag) FullNames() []string
- func (f StringFlag) HasLeader() bool
- func (f StringFlag) IsRequired() bool
- func (f StringFlag) MainName() string
- func (f StringFlag) Parse(str string) (interface{}, error)
- func (f StringFlag) PlaceholderStr() string
- func (f StringFlag) UsageStr() string
- type StringParam
- func (f StringParam) Default() interface{}
- func (f StringParam) DefaultStr() string
- func (f StringParam) DeprecationStr() string
- func (f StringParam) EnvVarStr() string
- func (f StringParam) FullNames() []string
- func (f StringParam) HasLeader() bool
- func (f StringParam) IsRequired() bool
- func (f StringParam) MainName() string
- func (f StringParam) Parse(str string) (interface{}, error)
- func (f StringParam) PlaceholderStr() string
- func (f StringParam) UsageStr() string
- type StringSlice
- func (f StringSlice) Default() interface{}
- func (f StringSlice) DefaultStr() string
- func (f StringSlice) DeprecationStr() string
- func (f StringSlice) EnvVarStr() string
- func (f StringSlice) FullNames() []string
- func (f StringSlice) HasLeader() bool
- func (f StringSlice) IsRequired() bool
- func (f StringSlice) MainName() string
- func (f StringSlice) Parse(str string) (interface{}, error)
- func (f StringSlice) PlaceholderStr() string
- func (f StringSlice) UsageStr() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationProvider ¶
func DurationProvider(ctx *completion.ProviderCtx) []string
func WithPrefix ¶
Types ¶
type BoolFlag ¶
type BoolFlag struct { Name string Alias string Value bool Usage string EnvVar string Deprecated string }
func (BoolFlag) DefaultStr ¶
func (BoolFlag) DeprecationStr ¶
func (BoolFlag) IsRequired ¶
func (BoolFlag) PlaceholderStr ¶
type DurationFlag ¶
type DurationFlag struct { Name string Alias string // Value is string instead of time.Duration so help can format it // however makes sense, like 120s instead of 2m0s Value string Usage string EnvVar string Required bool Deprecated string }
func (DurationFlag) Default ¶
func (f DurationFlag) Default() interface{}
func (DurationFlag) DefaultStr ¶
func (f DurationFlag) DefaultStr() string
func (DurationFlag) DeprecationStr ¶
func (f DurationFlag) DeprecationStr() string
func (DurationFlag) EnvVarStr ¶
func (f DurationFlag) EnvVarStr() string
func (DurationFlag) FullNames ¶
func (f DurationFlag) FullNames() []string
func (DurationFlag) HasLeader ¶
func (f DurationFlag) HasLeader() bool
func (DurationFlag) IsRequired ¶
func (f DurationFlag) IsRequired() bool
func (DurationFlag) MainName ¶
func (f DurationFlag) MainName() string
func (DurationFlag) Parse ¶
func (f DurationFlag) Parse(str string) (interface{}, error)
func (DurationFlag) PlaceholderStr ¶
func (f DurationFlag) PlaceholderStr() string
func (DurationFlag) UsageStr ¶
func (f DurationFlag) UsageStr() string
type Flag ¶
type Flag interface { MainName() string // without hyphens FullNames() []string // with hyphens IsRequired() bool DeprecationStr() string HasLeader() bool Default() interface{} // must not be called if flag is required Parse(string) (interface{}, error) PlaceholderStr() string // must not be called on bool flag DefaultStr() string // must not be called if flag is required EnvVarStr() string // must not be called if flag is required UsageStr() string }
type IntFlag ¶
type IntFlag struct { Name string Alias string Value int Usage string EnvVar string Required bool Deprecated string }
func (IntFlag) DefaultStr ¶
func (IntFlag) DeprecationStr ¶
func (IntFlag) IsRequired ¶
func (IntFlag) PlaceholderStr ¶
type StringFlag ¶
type StringFlag struct { Name string Alias string Value string Usage string Placeholder string EnvVar string Required bool Deprecated string }
func (StringFlag) Default ¶
func (f StringFlag) Default() interface{}
func (StringFlag) DefaultStr ¶
func (f StringFlag) DefaultStr() string
func (StringFlag) DeprecationStr ¶
func (f StringFlag) DeprecationStr() string
func (StringFlag) EnvVarStr ¶
func (f StringFlag) EnvVarStr() string
func (StringFlag) FullNames ¶
func (f StringFlag) FullNames() []string
func (StringFlag) HasLeader ¶
func (f StringFlag) HasLeader() bool
func (StringFlag) IsRequired ¶
func (f StringFlag) IsRequired() bool
func (StringFlag) MainName ¶
func (f StringFlag) MainName() string
func (StringFlag) Parse ¶
func (f StringFlag) Parse(str string) (interface{}, error)
func (StringFlag) PlaceholderStr ¶
func (f StringFlag) PlaceholderStr() string
func (StringFlag) UsageStr ¶
func (f StringFlag) UsageStr() string
type StringParam ¶
func (StringParam) Default ¶
func (f StringParam) Default() interface{}
func (StringParam) DefaultStr ¶
func (f StringParam) DefaultStr() string
func (StringParam) DeprecationStr ¶
func (f StringParam) DeprecationStr() string
func (StringParam) EnvVarStr ¶
func (f StringParam) EnvVarStr() string
func (StringParam) FullNames ¶
func (f StringParam) FullNames() []string
func (StringParam) HasLeader ¶
func (f StringParam) HasLeader() bool
func (StringParam) IsRequired ¶
func (f StringParam) IsRequired() bool
func (StringParam) MainName ¶
func (f StringParam) MainName() string
func (StringParam) Parse ¶
func (f StringParam) Parse(str string) (interface{}, error)
func (StringParam) PlaceholderStr ¶
func (f StringParam) PlaceholderStr() string
func (StringParam) UsageStr ¶
func (f StringParam) UsageStr() string
type StringSlice ¶
func (StringSlice) Default ¶
func (f StringSlice) Default() interface{}
func (StringSlice) DefaultStr ¶
func (f StringSlice) DefaultStr() string
func (StringSlice) DeprecationStr ¶
func (f StringSlice) DeprecationStr() string
func (StringSlice) EnvVarStr ¶
func (f StringSlice) EnvVarStr() string
func (StringSlice) FullNames ¶
func (f StringSlice) FullNames() []string
func (StringSlice) HasLeader ¶
func (f StringSlice) HasLeader() bool
func (StringSlice) IsRequired ¶
func (f StringSlice) IsRequired() bool
func (StringSlice) MainName ¶
func (f StringSlice) MainName() string
func (StringSlice) Parse ¶
func (f StringSlice) Parse(str string) (interface{}, error)
func (StringSlice) PlaceholderStr ¶
func (f StringSlice) PlaceholderStr() string
func (StringSlice) UsageStr ¶
func (f StringSlice) UsageStr() string
Click to show internal directories.
Click to hide internal directories.