On Tue, May 25, 2021 at 10:14 AM Delta Echo <deltaecho...@gmail.com> wrote:
> What does the parameter name `a` stands for in fmt package's functions? > func Printf(format string, a ...interface{}) (n int, err error) > > Is it argument? It's a parameter name. ...interface{} is the type of that argument, variadic in this case indicated by the ellipsis. Argument is for example the expression 42 in fmt.Printf("%i\n", 42). Within the body of Printf the 'a' parameter is typed as []interface{}. These questions are best answered by checking the language specification: https://golang.org/ref/spec#Function_types and https://golang.org/ref/spec#Passing_arguments_to_..._parameters -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-V9dGK5eSy-Z05z-3aJkYmDiCZ6G434GTFMpJ64VWuG-g%40mail.gmail.com.