map[string]interface如何转成map[string]string
更多评论
```golang
func MapInterface2String(inputData map[string]interface{}) map[string]string {
outputData := map[string]string{}
for key, value := range inputData {
switch value.(type) {
case string:
outputData[key] = value.(string)
case int:
tmp := value.(int)
outputData[key] = Int2Str(tmp)
case int64:
tmp := value.(int64)
outputData[key] = Int642Str(tmp)
}
}
return outputData
}
```
#2