Go beginner here, I am trying to create a generic routine to extract the values from a map, I have this right now:
func getValues(m map[interface{}]interface{}) []interface{} {
v := make([]interface{}, 0, len(m))
for _, value := range m {
v = append(v, value)
}
return v
}
and I called it like so:
nearby := make(map[string]Nearby)
values := getValues(nearby)
but I get this error:
cannot use nearby (type map[string]Nearby) as type map[interface {}]interface {} in argument to getValues