We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a struct field of type map[string][]string and env tag of SOMEVAR, how can one specify pairs in the environment variable?
map[string][]string
env
SOMEVAR
I recommend use of a semicolon. e.g.:
export SOMEVAR='foo1:bar1,bar2;foo2:bar3;foo1:bar4'
should result in:
map[string][]string{ "foo1": []string{ "bar1", "bar2", "bar4", }, "foo2": []string{ "bar3", }, }
Currently, it would result in:
map[string][]string{ "foo1": []string{ "bar1,bar2;foo2:bar3;foo1:bar4", }, }
Likewise, specifying (assuming short:"m"):
short:"m"
-m "foo1:bar1,bar2" -m "foo2:bar3,bar4" -m "foo1:bar5"
currently would result in:
map[string][]string{ "foo1": []string{ "bar5", }, "foo2": []string{ "bar3,bar4", }, }
instead of:
map[string][]string{ "foo1": []string{ "bar1", "bar2", "bar5", }, "foo2": []string{ "bar3", "bar4", }, }
Which is also clearly incorrect.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given a struct field of type
map[string][]string
andenv
tag ofSOMEVAR
, how can one specify pairs in the environment variable?I recommend use of a semicolon. e.g.:
export SOMEVAR='foo1:bar1,bar2;foo2:bar3;foo1:bar4'
should result in:
Currently, it would result in:
Likewise, specifying (assuming
short:"m"
):-m "foo1:bar1,bar2" -m "foo2:bar3,bar4" -m "foo1:bar5"
currently would result in:
instead of:
Which is also clearly incorrect.
The text was updated successfully, but these errors were encountered: