The only time I get frustrated by the lack of generics in go in trying to get keys from a map... I can't have a single `keys(map[string]T) []string` function.
func Keys(type K comparable, V interface{})(m map[K]V) []K {
r := make([]K, 0, len(m))
for k := range m {
r = append(r, k)
}
return r
}
Usage: m := map[int]int{1:2, 2:4}
k := maps.Keys(m)
// Now k is either []int{1, 2} or []int{2, 1}.So, that's an interesting thing.