返回元素类型不同的数组 []interface{}
返回的结果
{
"Code": 0,
"Total": 5,
"List": [
[
18,
"abc"
],
[
17,
"正则"
]
]
}
[]interface{}
type D struct {
Total int32
List *[][]interface{}
}
var p [][]interface{}
Total = reply.Total
for _, i := range reply.List {
p = append(p, []interface{}{i.Id, i.Name})
}
return Total, &p