1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2022-04-22 16:36:01 +08:00
parent 6977900201
commit e06c8e3463
2 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,8 @@ func TestMapSortInt(t *testing.T) {
}
ret := SortByKey(m).Desc().Values()
t.Log(SortByKey(m).Desc())
t.Log(SortByKey(m).Asc())
t.Log(ret)
}
@ -33,6 +35,7 @@ func TestJoin(t *testing.T) {
"Abc": "abc",
"Efg": "efg",
}
t.Log(m)
j := SortByKey(m).Asc().Join("&", func(k string, v any) string {
return fmt.Sprintf("%s=%v", k, v)