如何在golang中声明一个函数接受接口数组?

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

I think what you're looking for is this

package main

import "fmt"

func main() {
    interfacetious := []interface{}{"s", 123, float64(999)}
    stuff(interfacetious)
    stuff2(interfacetious...)

    stuff2("or", 123, "separate", float64(99), "values")
}

// Stuff can only work with slice of things
func stuff(s []interface{}) {
    fmt.Println(s)
}

// Stuff2 is polyvaridc and can handle individual vars, or a slice with ...
func stuff2(s ...interface{}) {
    fmt.Println(s)
}