-
-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
My scenario:
With the following env: MAP_STRING_TO_STRINGS="foo:bar,foo:baz"
I want to parse it into the following: map[foo:[bar baz]]
So something like this:
type Config struct {
MyMapOfSlices map[string][]string 'env:"MAP_STRING_TO_STRINGS" envSeparator:"," envKeyValSeparator:":"'
}
The solution that I'm using now is to first parse it into a string slice and then manually for each item I split the string at the separator and build my own map. Would it make sense to add this functionality natively in caarlos0/env instead?
Metadata
Metadata
Assignees
Labels
No labels