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

Function setUpS2SFlagSetWithDefault

string_to_string_test.go:21–25  ·  view source on GitHub ↗
(s2sp *map[string]string)

Source from the content-addressed store, hash-verified

19}
20
21func setUpS2SFlagSetWithDefault(s2sp *map[string]string) *FlagSet {
22 f := NewFlagSet("test", ContinueOnError)
23 f.StringToStringVar(s2sp, "s2s", map[string]string{"da": "1", "db": "2", "de": "5,6"}, "Command separated ls2st!")
24 return f
25}
26
27func createS2SFlag(vals map[string]string) string {
28 records := make([]string, 0, len(vals)>>1)

Callers 2

TestS2SDefaultFunction · 0.85
TestS2SWithDefaultFunction · 0.85

Calls 2

StringToStringVarMethod · 0.95
NewFlagSetFunction · 0.85

Tested by

no test coverage detected