feat: rename browser layout and add generics util function

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ committed 2022-04-08 19:08:22 +08:00
1 parent 87a026a13e
commit a6efcff6ea
24 files changed
+1717 -244

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
package typeutil
// Keys returns a slice of the keys of the map. based with go 1.18 generics
func Keys[K comparable, V any](m map[K]V) []K {
r := make([]K, 0, len(m))
for k := range m {
r = append(r, k)
}
return r
}