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

Method StringToIntVar

string_to_int.go:102–104  ·  view source on GitHub ↗

StringToIntVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]int variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

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

Source from the content-addressed store, hash-verified

100// The argument p points to a map[string]int variable in which to store the values of the multiple flags.
101// The value of each argument will not try to be separated by comma
102func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) {
103 f.VarP(newStringToIntValue(value, p), name, "", usage)
104}
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) {

Callers 2

setUpS2IFlagSetFunction · 0.95

Calls 2

VarPMethod · 0.95
newStringToIntValueFunction · 0.85

Tested by 2

setUpS2IFlagSetFunction · 0.76