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

Method StringToIntVarP

string_to_int.go:107–109  ·  view source on GitHub ↗

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

(p *map[string]int, name, shorthand string, value map[string]int, usage string)

Source from the content-addressed store, hash-verified

105
106// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash.
107func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) {
108 f.VarP(newStringToIntValue(value, p), name, shorthand, usage)
109}
110
111// StringToIntVar defines a string flag with specified name, default value, and usage string.
112// The argument p points to a map[string]int variable in which to store the value of the flag.

Callers 2

StringToIntMethod · 0.95
StringToIntPMethod · 0.95

Calls 2

VarPMethod · 0.95
newStringToIntValueFunction · 0.85

Tested by

no test coverage detected