This commit is contained in:
withchao
2023-07-10 17:51:57 +08:00
parent f5dcc6c8a3
commit 04474c6747
3 changed files with 250 additions and 289 deletions
+5 -4
View File
@@ -12,12 +12,13 @@ import (
"unicode/utf8"
)
func toPbMapArray(m map[string][]string) map[string]*third.MapValues {
res := make(map[string]*third.MapValues)
func toPbMapArray(m map[string][]string) []*third.KeyValues {
res := make([]*third.KeyValues, 0, len(m))
for key := range m {
res[key] = &third.MapValues{
res = append(res, &third.KeyValues{
Key: key,
Values: m[key],
}
})
}
return res
}