Documentation ¶
Index ¶
- type BackwardsCompatibilityFlag
- func (f *BackwardsCompatibilityFlag) GetName() string
- func (f *BackwardsCompatibilityFlag) GetShortName() string
- func (f *BackwardsCompatibilityFlag) GetValue() interface{}
- func (f *BackwardsCompatibilityFlag) Set(v string)
- func (f *BackwardsCompatibilityFlag) String() string
- func (f *BackwardsCompatibilityFlag) Visible() bool
- type BoolFlag
- type FlagContext
- type FlagSet
- type Float64Flag
- type IntFlag
- type StringFlag
- type StringSliceFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackwardsCompatibilityFlag ¶
type BackwardsCompatibilityFlag struct{}
func (*BackwardsCompatibilityFlag) GetName ¶
func (f *BackwardsCompatibilityFlag) GetName() string
func (*BackwardsCompatibilityFlag) GetShortName ¶
func (f *BackwardsCompatibilityFlag) GetShortName() string
func (*BackwardsCompatibilityFlag) GetValue ¶
func (f *BackwardsCompatibilityFlag) GetValue() interface{}
func (*BackwardsCompatibilityFlag) Set ¶
func (f *BackwardsCompatibilityFlag) Set(v string)
func (*BackwardsCompatibilityFlag) String ¶
func (f *BackwardsCompatibilityFlag) String() string
func (*BackwardsCompatibilityFlag) Visible ¶
func (f *BackwardsCompatibilityFlag) Visible() bool
type BoolFlag ¶
func (*BoolFlag) GetShortName ¶
type FlagContext ¶
type FlagContext interface { Parse(...string) error Args() []string Int(string) int Float64(string) float64 Bool(string) bool String(string) string StringSlice(string) []string IsSet(string) bool SkipFlagParsing(bool) NewStringFlag(name string, shortName string, usage string) NewStringFlagWithDefault(name string, shortName string, usage string, value string) NewBoolFlag(name string, shortName string, usage string) NewIntFlag(name string, shortName string, usage string) NewIntFlagWithDefault(name string, shortName string, usage string, value int) NewFloat64Flag(name string, shortName string, usage string) NewFloat64FlagWithDefault(name string, shortName string, usage string, value float64) NewStringSliceFlag(name string, shortName string, usage string) NewStringSliceFlagWithDefault(name string, shortName string, usage string, value []string) ShowUsage(leadingSpace int) string }
func New ¶
func New() FlagContext
func NewFlagContext ¶
func NewFlagContext(cmdFlags map[string]FlagSet) FlagContext
type Float64Flag ¶
func (*Float64Flag) GetName ¶
func (f *Float64Flag) GetName() string
func (*Float64Flag) GetShortName ¶
func (f *Float64Flag) GetShortName() string
func (*Float64Flag) GetValue ¶
func (f *Float64Flag) GetValue() interface{}
func (*Float64Flag) Set ¶
func (f *Float64Flag) Set(v string)
func (*Float64Flag) String ¶
func (f *Float64Flag) String() string
func (*Float64Flag) Visible ¶
func (f *Float64Flag) Visible() bool
type StringFlag ¶
func (*StringFlag) GetName ¶
func (f *StringFlag) GetName() string
func (*StringFlag) GetShortName ¶
func (f *StringFlag) GetShortName() string
func (*StringFlag) GetValue ¶
func (f *StringFlag) GetValue() interface{}
func (*StringFlag) Set ¶
func (f *StringFlag) Set(v string)
func (*StringFlag) String ¶
func (f *StringFlag) String() string
func (*StringFlag) Visible ¶
func (f *StringFlag) Visible() bool
type StringSliceFlag ¶
type StringSliceFlag struct { Name string Value []string Usage string ShortName string Hidden bool }
StringSlice flag can be define multiple times in the arguments
func (*StringSliceFlag) GetName ¶
func (f *StringSliceFlag) GetName() string
func (*StringSliceFlag) GetShortName ¶
func (f *StringSliceFlag) GetShortName() string
func (*StringSliceFlag) GetValue ¶
func (f *StringSliceFlag) GetValue() interface{}
func (*StringSliceFlag) Set ¶
func (f *StringSliceFlag) Set(v string)
func (*StringSliceFlag) String ¶
func (f *StringSliceFlag) String() string
func (*StringSliceFlag) Visible ¶
func (f *StringSliceFlag) Visible() bool
Click to show internal directories.
Click to hide internal directories.