更新时间:2021-10-17 23:18:11
您必须将接口{}显式转换为所需类型的切片才能实现.像这样 https://play.golang.org/p/yZmniZwFar
You have to explicitly convert your interface{} to a slice of the expected type to achieve it. Something like this https://play.golang.org/p/yZmniZwFar
得到无效的操作:尝试为地图建立索引时,mymap [“ title”](类型接口{}不支持索引)
类型接口{}不支持golang中的索引编制
无效的操作:类型接口{}不支持索引