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

Function StringToIntVarP

string_to_int.go:119–121  ·  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

117
118// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash.
119func StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) {
120 CommandLine.VarP(newStringToIntValue(value, p), name, shorthand, usage)
121}
122
123// StringToInt defines a string flag with specified name, default value, and usage string.
124// The return value is the address of a map[string]int variable that stores the value of the flag.

Callers

nothing calls this directly

Calls 2

newStringToIntValueFunction · 0.85
VarPMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…