Golang文档中“ interface {}”之前的“ a”和“…”是什么意思? [重复]

This question already has an answer here:

In the official documentation, codes like the following appear often.

func Printf(format string, a ...interface{}) (n int, err error)

what are a and ... mean respectively?

</div>

a is a variable, like any other. ... is a way to grab many arguments into a slice.

It could be written as:

func Printf(format string, a []interface{}) (n int, err error)

but then you'd have to call it like this:

Printf("", []interface{1,2,3})

rather than like this

Printf("", 1, 2, 3)