-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
I currently use Viper to configure a Docker service. It doesn't make sense for people to change the entrypoint. So I rely on ENV vars heavily.
Following up with #608, using AutomaticEnv()
with GetStringMapString()
still doesn't work.
Looking through the source code, Viper branches based on the source. I debugged and found the function below gets an exception because it can't parse foo=bar
style values with JSON. It also unexpectedly swallows and exception here :/
func ToStringMapString(i interface{}) map[string]string {
v, _ := ToStringMapStringE(i)
return v
}
As a user, I expect viper.Get***()
to work regardless of the source.
I believe the chang would actually have to be in https://github.com/spf13/cast/blob/master/cast.go#L108-L110.
Metadata
Metadata
Assignees
Labels
No labels