Documentation ¶
Index ¶
- Constants
- func UsageFunc(groups ...*Group) func() string
- type Flag
- type FlagOption
- type FlagRef
- type FlagSet
- func (f *FlagSet) Args() []string
- func (f *FlagSet) Bool(name, usage string) FlagRef[bool]
- func (f *FlagSet) FixedStringFlags(name, usage string) FlagRef[[][2]string]
- func (f *FlagSet) Lookup(name string) *Flag
- func (f *FlagSet) NewGroup(name string) *Group
- func (f *FlagSet) Parse(args []string) error
- func (f *FlagSet) String(name, usage string) FlagRef[string]
- func (f *FlagSet) StringFlags(name, usage string) FlagRef[[]string]
- func (f *FlagSet) Strings(name, usage string) FlagRef[[]string]
- func (f *FlagSet) Var(v Value, name, usage string, opts ...FlagOption) *Flag
- type FlagType
- type Group
- func (g *Group) AddDescription(s string) *Group
- func (g *Group) AddOptional(flag *Flag) *Group
- func (g *Group) AddRequired(flag *Flag) *Group
- func (g *Group) Lookup(name string) *Flag
- func (g *Group) LookupByType(typ FlagType) []*Flag
- func (g *Group) NonGroupFlagNames() []string
- func (g *Group) Seen(name string) bool
- func (g *Group) Usage() string
- type Value
- type Values
Constants ¶
View Source
const (
CapNoLimit = -1
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FlagOption ¶
type FlagOption func(*Flag)
func WithDenyDuplicate ¶
func WithDenyDuplicate() FlagOption
type FlagSet ¶
type FlagSet struct { Usage func() string // contains filtered or unexported fields }
func NewFlagSet ¶
func (*FlagSet) FixedStringFlags ¶ added in v0.3.0
FixedStringFlags presents `-flag <value1> <value2> -flag <value3> <value4> -flag ...` This is a reference implementation
func (*FlagSet) StringFlags ¶ added in v0.3.0
StringFlags presents `-flag <value1> -flag <value2> -flag <value3> -flag ...`
type Group ¶
type Group struct { Name string // contains filtered or unexported fields }
func LookupGroup ¶
func (*Group) AddDescription ¶
func (*Group) AddOptional ¶ added in v0.3.0
func (*Group) AddRequired ¶ added in v0.3.0
func (*Group) LookupByType ¶
func (*Group) NonGroupFlagNames ¶ added in v0.3.0
NonGroupFlagNames returns non group flag with specified
Click to show internal directories.
Click to hide internal directories.