Refactor code

This commit is contained in:
wenxu12345
2021-12-30 21:28:38 +08:00
parent a654073c71
commit dcba4fef48
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ import (
func JsonDataList(resp ...interface{}) []map[string]interface{} {
result := make([]map[string]interface{}, 0)
for _, v := range resp {
m := ProtoToMap(v.(proto.Message), false)
for _, v := range resp[0].([]proto.Message) {
m := ProtoToMap(v, false)
result = append(result, m)
}
return result