If the final argument is assignable to a slice type []T, it is
passed unchanged as the value for a ...T parameter if the argument
is followed by .... In this case no new slice is created.
The final argument to Printf is []interface{}, while you are trying to
pass []string. In order for this to work, []string would have to be
assignable to []interface{}, which it isn't.
If, after reading the above links and the definition of assignability at
https://golang.org/ref/spec#Assignability, you are still unclear why it
is not compiling, ask on the list for more help.
...Marvin
Marvin Renich
unread,
Jun 29, 2020, 2:21:02 PM6/29/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message