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

WeChat