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

Method StringToStringP

string_to_string.go:152–156  ·  view source on GitHub ↗

StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash.

(name, shorthand string, value map[string]string, usage string)

Source from the content-addressed store, hash-verified

150
151// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash.
152func (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string {
153 p := map[string]string{}
154 f.StringToStringVarP(&p, name, shorthand, value, usage)
155 return &p
156}
157
158// StringToString defines a string flag with specified name, default value, and usage string.
159// The return value is the address of a map[string]string variable that stores the value of the flag.

Callers 2

StringToStringFunction · 0.80
StringToStringPFunction · 0.80

Calls 1

StringToStringVarPMethod · 0.95

Tested by

no test coverage detected