mirror of https://github.com/spf13/cast.git
Handling another case (map[string]interface{})
This commit is contained in:
parent
5a9b0d4cc3
commit
b252e9f21d
4
caste.go
4
caste.go
|
@ -149,6 +149,10 @@ func ToStringMapStringE(i interface{}) (map[string]string, bool) {
|
||||||
for k, val := range v {
|
for k, val := range v {
|
||||||
m[ToString(k)] = ToString(val)
|
m[ToString(k)] = ToString(val)
|
||||||
}
|
}
|
||||||
|
case map[string]interface{}:
|
||||||
|
for k, val := range v {
|
||||||
|
m[ToString(k)] = ToString(val)
|
||||||
|
}
|
||||||
case map[string]string:
|
case map[string]string:
|
||||||
return v, true
|
return v, true
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue