I have this function:
func functionX(collection []*interface{}) {
...
response, err := json.MarshalIndent(collection, "", " ")
...
}
I want the collection parameter to allow arrays of any kind, that's why I tried with *interface{} but I'm receiving errors like this:
cannot use MyDataType (type []*model.MyDataType) as type []*interface {} in argument to middleware.functionX