Open
Description
The docs say:
env-separator="<value>" - custom list and map separator. If not set, the default separator , will be used;
implying maps with arbitrary keys are supported. Yet, there's no example for it.
It is unclear how to assign env variable to a attribute of a struct which is a value of a map:
Let's say we have:
config.go:
Animals map[string]Animal `yaml:"animals" env:"ANIMALS"`
Animal struct {
Name: string `yaml:"name" env:"NAME"`
}
config.yaml:
animals:
dog:
name: "Rocky"
cat:
name: "Jack"
-
How do I provide names through env vars?
Is itANIMALS_DOG_NAME
/ANIMALS_CAT_NAME
or what? -
What's
env-separator
is about?
Metadata
Metadata
Assignees
Labels
No labels