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

Function StringToStringVar

string_to_string.go:133–135  ·  view source on GitHub ↗

StringToStringVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]string 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]string, name string, value map[string]string, usage string)

Source from the content-addressed store, hash-verified

131// The argument p points to a map[string]string variable in which to store the value of the flag.
132// The value of each argument will not try to be separated by comma
133func StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) {
134 CommandLine.VarP(newStringToStringValue(value, p), name, "", usage)
135}
136
137// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.
138func StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) {

Callers

nothing calls this directly

Calls 2

newStringToStringValueFunction · 0.85
VarPMethod · 0.80

Tested by

no test coverage detected