MCPcopy
hub / github.com/spf13/pflag / VarP

Method VarP

flag.go:866–868  ·  view source on GitHub ↗

VarP is like Var, but accepts a shorthand letter that can be used after a single dash.

(value Value, name, shorthand, usage string)

Source from the content-addressed store, hash-verified

864
865// VarP is like Var, but accepts a shorthand letter that can be used after a single dash.
866func (f *FlagSet) VarP(value Value, name, shorthand, usage string) {
867 f.VarPF(value, name, shorthand, usage)
868}
869
870// AddFlag will add the flag to the FlagSet
871func (f *FlagSet) AddFlag(flag *Flag) {

Callers 15

IPMaskVarMethod · 0.95
IPMaskVarPMethod · 0.95
StringToIntVarMethod · 0.95
StringToIntVarPMethod · 0.95
UintVarMethod · 0.95
UintVarPMethod · 0.95
DurationSliceVarMethod · 0.95
DurationSliceVarPMethod · 0.95
IPNetSliceVarMethod · 0.95
IPNetSliceVarPMethod · 0.95
Uint16VarMethod · 0.95
Uint16VarPMethod · 0.95

Calls 1

VarPFMethod · 0.95

Tested by 2

TestUserDefinedFunction · 0.76
TestPrintDefaultsFunction · 0.76