Open fxierh opened 8 months ago
Quoting from the documentation of func StringToStringVar:
func StringToStringVar
The value of each argument will not try to be separated by comma.
However with the following program:
res := make(map[string]string) flag.StringToStringVar(&res, "foo-flag", res, "foo-flag-usage") flag.Parse()
go run ... --foo-flag "foo=bar,baz=quux" results in res = map[baz:quux foo:bar].
go run ... --foo-flag "foo=bar,baz=quux"
res = map[baz:quux foo:bar]
I'm happy to submit a PR for this if needed.
Quoting from the documentation of
func StringToStringVar
:However with the following program:
go run ... --foo-flag "foo=bar,baz=quux"
results inres = map[baz:quux foo:bar]
.