Browse Source

Handling another case (map[string]interface{})

tags/v1.0.0
spf13 10 years ago
parent
commit
b252e9f21d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      caste.go

+ 4
- 0
caste.go View File

@@ -149,6 +149,10 @@ func ToStringMapStringE(i interface{}) (map[string]string, bool) {
for k, val := range v {
m[ToString(k)] = ToString(val)
}
case map[string]interface{}:
for k, val := range v {
m[ToString(k)] = ToString(val)
}
case map[string]string:
return v, true
default:


Loading…
Cancel
Save