且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

类型接口{}不支持golang中的索引编制

更新时间: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