it will be useful for example to add custom decode hook for example to parse json value from environment variable
type Config struct {
Metadata map[string]string `mapstructure:"metadata"`
}
we can set env like this CONFIG_METADATA='{"foo":"bar"}' and it will parsed as correct structure
current behavior it will throw an error `'config.metadata' expected a map, got 'string'
and there's no way to configure metadata via environment variable
Context
Unmarshal
withopts ...DecoderConfigOption
https://github.com/spf13/viper/blob/518241257478c557633ab36e474dfcaeb9a3c623/viper.go#L1092-L1096 but salt currently don't have way to pass this option https://github.com/odpf/salt/blob/d87827936ed20900992ac759041ed6522926fba9/config/config.go#L170-L172we can set env like this
CONFIG_METADATA='{"foo":"bar"}'
and it will parsed as correct structure current behavior it will throw an error `'config.metadata' expected a map, got 'string' and there's no way to configure metadata via environment variable