Open jasonlimantoro opened 1 year ago
For example, I have the following Config root
var RootConfig Root type Root struct { Http map[string]HttpConfig `yaml:"http" env:"HTTP"` } type HttpConfig struct { Host string `yaml:"host"` TimeoutMs int `yaml:"timeout_ms"` } func Load(configPath string) { cleanenv.ReadConfig(configPath, &RootConfig) }
I know I can provide the following to populate http key via the following yaml structure:
http
yaml
http: payment: host: "http://payment:4000" timeout_ms: 2000
But what about via environment variable? What would HTTP env var look like?
HTTP
i'm also interested here as i have a similar usecase :)
would be really great if this would be possible
Bumping this issue, have a problem with a map, too.
For example, I have the following Config root
I know I can provide the following to populate
http
key via the followingyaml
structure:But what about via environment variable? What would
HTTP
env var look like?