I want to declare a function accept array of interface, such as this:
func (this *CvStoreServiceImpl) setItemList(coll *mgo.Collection, itemList ...interface{}) (err error)
Howerver, when I call this function like as follow failed:
jobList := cvRaw.GetJobList()
this.setItemList(jobColl, jobList...)
here this the error:
cannot use cvRaw.GetJobList() (type []*cv_type.CvJobItemRaw) as type []interface {} in argument to this.setItemList