I tried
func Keys(m map[string]interface{}) []string {
keys := make([]string, 0, len(m))
for k := range m {
keys = append(keys, k)
}
return keys
}
but
cannot use m (type map[string]int) as type map[string]interface {} in argument to Keys
I know that golang doesn't support generics, so is it possible to get keys slice uniformly?