mirror of
https://github.com/1f349/lotus.git
synced 2024-11-09 22:52:53 +00:00
10 lines
162 B
Go
10 lines
162 B
Go
package utils
|
|
|
|
func MapKeys[M ~map[K]any, K comparable](src M) []K {
|
|
dst := make([]K, 0, len(src))
|
|
for k := range src {
|
|
dst = append(dst, k)
|
|
}
|
|
return dst
|
|
}
|