pflagfork

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default         mode = iota // default behaviour
	ShorthandOnly               // only the shorthand should be used
	NameAsShorthand             // non-posix mode where the name is also added as shorthand (single `-` prefix)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag added in v0.26.0

type Flag struct {
	*pflag.Flag
	Prefix string
	Args   []string
}

func (Flag) Consumes added in v0.40.0

func (f Flag) Consumes(arg string) bool

func (Flag) Definition added in v0.36.1

func (f Flag) Definition() string

func (Flag) IsOptarg added in v0.31.1

func (f Flag) IsOptarg() bool

func (Flag) IsRepeatable added in v0.29.3

func (f Flag) IsRepeatable() bool

func (Flag) Mode added in v0.36.1

func (f Flag) Mode() mode

func (Flag) Nargs added in v0.33.0

func (f Flag) Nargs() int

func (Flag) OptargDelimiter added in v0.32.0

func (f Flag) OptargDelimiter() rune

func (Flag) Required added in v0.38.2

func (f Flag) Required() bool

func (Flag) Style added in v0.29.3

func (f Flag) Style() string

func (Flag) TakesValue added in v0.31.1

func (f Flag) TakesValue() bool

type FlagSet added in v0.26.0

type FlagSet struct {
	*pflag.FlagSet
}

func (FlagSet) IsInterspersed added in v0.38.0

func (f FlagSet) IsInterspersed() bool

func (FlagSet) IsMutuallyExclusive added in v0.29.3

func (f FlagSet) IsMutuallyExclusive(flag *pflag.Flag) bool

func (FlagSet) IsPosix added in v0.29.3

func (f FlagSet) IsPosix() bool

func (FlagSet) IsShorthandSeries added in v0.32.0

func (f FlagSet) IsShorthandSeries(arg string) bool

func (FlagSet) LookupArg added in v0.32.0

func (fs FlagSet) LookupArg(arg string) (result *Flag)

func (FlagSet) ShorthandLookup added in v0.40.0

func (fs FlagSet) ShorthandLookup(name string) *Flag

func (*FlagSet) VisitAll added in v0.29.3

func (f *FlagSet) VisitAll(fn func(*Flag))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL