Documentation ¶
Index ¶
- func Bool(name string) bool
- func BoolE(name string) (bool, error)
- func Float64(name string) float64
- func Float64E(name string) (float64, error)
- func Int(name string) int64
- func IntE(name string) (int64, error)
- func Parse() error
- func ParseWithArgs(arguments []string) error
- func Register(fs ...Flag)
- func SetFlagSet(fs *FlagSet)
- func String(name string) string
- func StringE(name string) (string, error)
- func Uint(name string) uint64
- func UintE(name string) (uint64, error)
- func With(fs ...Flag)
- type BoolFlag
- type Flag
- type FlagSet
- func (fs *FlagSet) Bool(name string) bool
- func (fs *FlagSet) BoolE(name string) (bool, error)
- func (fs *FlagSet) Float64(name string) float64
- func (fs *FlagSet) Float64E(name string) (float64, error)
- func (fs *FlagSet) Int(name string) int64
- func (fs *FlagSet) IntE(name string) (int64, error)
- func (fs *FlagSet) Lookup(name string) *flag.Flag
- func (fs *FlagSet) Parse() error
- func (fs *FlagSet) ParseWithArgs(arguments []string) error
- func (fs *FlagSet) Register(flags ...Flag)
- func (fs *FlagSet) String(name string) string
- func (fs *FlagSet) StringE(name string) (string, error)
- func (fs *FlagSet) Uint(name string) uint64
- func (fs *FlagSet) UintE(name string) (uint64, error)
- func (fs *FlagSet) With(flags ...Flag)
- type Float64Flag
- type IntFlag
- type StringFlag
- type UintFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseWithArgs ¶
ParseWithArgs parses the flagset with given args.
Types ¶
type BoolFlag ¶
type BoolFlag struct { Name string Usage string EnvVar string Default bool Variable *bool Action func(string, *FlagSet) }
BoolFlag is a bool flag implements of Flag interface.
type FlagSet ¶
FlagSet wraps a set of Flags.
func NewFlagSet ¶
NewFlagSet new flagSet
func (*FlagSet) ParseWithArgs ¶
ParseWithArgs parses provided flagset with given args.
type Float64Flag ¶
type Float64Flag struct { Name string Usage string EnvVar string Default float64 Variable *float64 Action func(string, *FlagSet) }
Float64Flag is a float flag implements of Flag interface.
func (*Float64Flag) Apply ¶
func (f *Float64Flag) Apply(set *FlagSet)
Apply implements of Flag Apply function.
type IntFlag ¶
type IntFlag struct { Name string Usage string EnvVar string Default int Variable *int Action func(string, *FlagSet) }
IntFlag is an int flag implements of Flag interface.
type StringFlag ¶
type StringFlag struct { Name string Usage string EnvVar string Default string Variable *string Action func(string, *FlagSet) }
StringFlag is a string flag implements of Flag interface.
func (*StringFlag) Apply ¶
func (f *StringFlag) Apply(set *FlagSet)
Apply implements of Flag Apply function.
Click to show internal directories.
Click to hide internal directories.