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

This commit is contained in:
spf13 2014-04-07 22:40:49 -04:00
parent 5a9b0d4cc3
commit b252e9f21d
1 changed files with 4 additions and 0 deletions

View File

@ -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: