1
FreeEx 2023-05-04 17:52:26 +08:00
把 list 换成 slice 就好了,golang 里面的 list 很少使用。
|
2
willchen 2023-05-04 17:54:04 +08:00
data := make(map[string]interface{})
data["sign_type"] = "sign" data["dev_sno"] = "888088" data["register_no"] = "888088" data["type"] = "1" dataPersonInfo := make([]map[string]int, 0) dataPersonInfo = append(dataPersonInfo, map[string]int{ "person_type": 4, "total": 10, }) dataPersonInfo = append(dataPersonInfo, map[string]int{ "person_type": 3, "total": 5, }) data["personInfo"] = dataPersonInfo |
3
sunny352787 2023-05-04 17:58:13 +08:00
|
4
gmlaogong OP |