copy langext & termext from ffsclient
This commit is contained in:
9
langext/maps.go
Normal file
9
langext/maps.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package langext
|
||||
|
||||
func MapKeyArr[T comparable, V any](v map[T]V) []T {
|
||||
result := make([]T, 0, len(v))
|
||||
for k := range v {
|
||||
result = append(result, k)
|
||||
}
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user