Documentation ¶
Index ¶
- type Command
- type Flag
- func (f *Flag[T]) Default(defaultValue T) *Flag[T]
- func (f *Flag[T]) Deprecated(msg string) *Flag[T]
- func (f *Flag[_]) Flag() *pflag.Flag
- func (f *Flag[T]) Hidden() *Flag[T]
- func (f *Flag[T]) Required() *Flag[T]
- func (f *Flag[T]) Shorthand(p string) *Flag[T]
- func (f *Flag[T]) ShorthandDeprecated(msg string) *Flag[T]
- func (f *Flag[_]) Value() string
- func (f *Flag[T]) Var(p *T) *Flag[T]
- type FlagSet
- func (fs *FlagSet) AddFlagSet(v *FlagSet)
- func (fs *FlagSet) Args() []string
- func (fs *FlagSet) Bool(name, usage string) *Flag[bool]
- func (fs *FlagSet) Copy() *FlagSet
- func (fs *FlagSet) Duration(name, usage string) *Flag[time.Duration]
- func (fs *FlagSet) Float32(name, usage string) *Flag[float32]
- func (fs *FlagSet) HasFlags() bool
- func (fs *FlagSet) Int(name, usage string) *Flag[int]
- func (fs *FlagSet) Int64(name, usage string) *Flag[int64]
- func (fs *FlagSet) Len() int
- func (fs *FlagSet) OnelineUsage(leftPadding, wrap int) string
- func (fs *FlagSet) Parse(args []string) error
- func (fs *FlagSet) String(name, usage string) *Flag[string]
- func (fs *FlagSet) StringArray(name, usage string) *Flag[[]string]
- func (fs *FlagSet) Uint(name, usage string) *Flag[uint]
- func (fs *FlagSet) Usage() string
- type FlagValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶ added in v0.15.0
type Command struct { Use string Short string Long string Run func(ctx context.Context, cmd *Command, args []string) error // contains filtered or unexported fields }
func (*Command) AddCommand ¶ added in v0.15.0
type Flag ¶ added in v0.15.0
type Flag[T flagTypes] struct {
// contains filtered or unexported fields
}
func (*Flag[T]) Deprecated ¶ added in v0.15.0
func (*Flag[T]) ShorthandDeprecated ¶ added in v0.15.0
type FlagSet ¶ added in v0.15.0
type FlagSet struct {
// contains filtered or unexported fields
}
func NewFlagSet ¶ added in v0.15.0
func NewFlagSet(name string, errorHandling pflag.ErrorHandling) *FlagSet
func (*FlagSet) AddFlagSet ¶ added in v0.15.0
func (*FlagSet) OnelineUsage ¶ added in v0.15.0
func (*FlagSet) StringArray ¶ added in v0.15.0
Click to show internal directories.
Click to hide internal directories.