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

Function setUpS2IFlagSetWithDefault

string_to_int_test.go:20–24  ·  view source on GitHub ↗
(s2ip *map[string]int)

Source from the content-addressed store, hash-verified

18}
19
20func setUpS2IFlagSetWithDefault(s2ip *map[string]int) *FlagSet {
21 f := NewFlagSet("test", ContinueOnError)
22 f.StringToIntVar(s2ip, "s2i", map[string]int{"a": 1, "b": 2}, "Command separated ls2it!")
23 return f
24}
25
26func createS2IFlag(vals map[string]int) string {
27 var buf bytes.Buffer

Callers 2

TestS2IDefaultFunction · 0.85
TestS2IWithDefaultFunction · 0.85

Calls 2

StringToIntVarMethod · 0.95
NewFlagSetFunction · 0.85

Tested by

no test coverage detected