mirror of
https://github.com/spf13/viper
synced 2025-01-07 11:16:37 +00:00
Handle maps in type inference from default values
This commit is contained in:
parent
5c0d079c4e
commit
70f27e465a
1 changed files with 4 additions and 0 deletions
4
viper.go
4
viper.go
|
@ -871,6 +871,10 @@ func (v *Viper) Get(key string) interface{} {
|
|||
return cast.ToStringSlice(val)
|
||||
case []int:
|
||||
return cast.ToIntSlice(val)
|
||||
case map[string]string:
|
||||
return cast.ToStringMapString(val)
|
||||
case map[string]interface{}:
|
||||
return cast.ToStringMap(val)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue