My input is an interface{}, and I know it can be an array of any type.
I'd like to read one of the elements of my input, so I try to convert my interface{} into an []interface{}, but go will give me the following error:
panic: interface conversion: interface {} is []map[string]int, not []interface {}
How can I do that conversion? (without reflect if possible).
Thanks
[]map[string]int, type assert[]map[string]intfrom it, not[]interface{}. If the value may be other slice types too, use a type switch.