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

Method StringToStringVar

string_to_string.go:121–123  ·  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 values of the multiple flags. 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

119// The argument p points to a map[string]string variable in which to store the values of the multiple flags.
120// The value of each argument will not try to be separated by comma
121func (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) {
122 f.VarP(newStringToStringValue(value, p), name, "", usage)
123}
124
125// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.
126func (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) {

Callers 2

setUpS2SFlagSetFunction · 0.95

Calls 2

VarPMethod · 0.95
newStringToStringValueFunction · 0.85

Tested by 2

setUpS2SFlagSetFunction · 0.76