mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-15 14:35:57 +08:00
Refactor code
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
|||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func JsonDataList(resp interface{}) []map[string]interface{} {
|
func JsonDataList(resp ...interface{}) []map[string]interface{} {
|
||||||
result := make([]map[string]interface{}, 0)
|
result := make([]map[string]interface{}, 0)
|
||||||
for _, v := range resp.([]proto.Message) {
|
for _, v := range resp {
|
||||||
m := ProtoToMap(v.(proto.Message), false)
|
m := ProtoToMap(v.(proto.Message), false)
|
||||||
result = append(result, m)
|
result = append(result, m)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user