golang 将interface{}转换成map方便读取

interface{}读取非常不方便,将其转换成map类型后就可以读取了

#res是个interface{}
res.(map[string]interface{})

参考:http://stackoverflow.com/questions/25214036/getting-invalid-operation-mymaptitle-type-interface-does-not-support-in


评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注