I was going through some code written in Google\'s Go language, and I came across this:
func Statusln(a ...interface{})
func Statusf(format string, a ...inte
It is variable length argument
func Printf(format string, v ...interface{}) (n int, err error) {
Take for example this signature. Here we define that we have one string to print, but this string can be interpolated with variable number of things (of arbitrary type) to substitude (actually, I took this function from fmt package):
fmt.Printf("just i: %v", i)
fmt.Printf("i: %v and j: %v",i,j)
As you can see here, with variadic arguments, one signature fits all lengths.
Moreover, you can specify some exact type like ...int.