pflagfork

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 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

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

func (Flag) Consumes

func (f Flag) Consumes(arg string) bool

func (Flag) Definition

func (f Flag) Definition() string

func (Flag) IsOptarg

func (f Flag) IsOptarg() bool

func (Flag) IsRepeatable

func (f Flag) IsRepeatable() bool

func (Flag) Mode

func (f Flag) Mode() mode

func (Flag) Nargs

func (f Flag) Nargs() int

func (Flag) OptargDelimiter

func (f Flag) OptargDelimiter() rune

func (Flag) Required

func (f Flag) Required() bool

func (Flag) Style

func (f Flag) Style() string

func (Flag) TakesValue

func (f Flag) TakesValue() bool

type FlagSet

type FlagSet struct {
	*pflag.FlagSet
}

func (FlagSet) IsInterspersed

func (f FlagSet) IsInterspersed() bool

func (FlagSet) IsMutuallyExclusive

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

func (FlagSet) IsPosix

func (f FlagSet) IsPosix() bool

func (FlagSet) IsShorthandSeries

func (f FlagSet) IsShorthandSeries(arg string) bool

func (FlagSet) LookupArg

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

func (FlagSet) ShorthandLookup

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

func (*FlagSet) VisitAll

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