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

Method StringToString

string_to_string.go:145–149  ·  view source on GitHub ↗

StringToString defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]string variable that stores the value of the flag. The value of each argument will not try to be separated by comma

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

Source from the content-addressed store, hash-verified

143// The return value is the address of a map[string]string variable that stores the value of the flag.
144// The value of each argument will not try to be separated by comma
145func (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string {
146 p := map[string]string{}
147 f.StringToStringVarP(&p, name, "", value, usage)
148 return &p
149}
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 {

Callers

nothing calls this directly

Calls 1

StringToStringVarPMethod · 0.95

Tested by

no test coverage detected