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

Function StringToIntVar

string_to_int.go:114–116  ·  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 value of the flag. 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

112// The argument p points to a map[string]int variable in which to store the value of the flag.
113// The value of each argument will not try to be separated by comma
114func StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) {
115 CommandLine.VarP(newStringToIntValue(value, p), name, "", usage)
116}
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) {

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…