On Fri, May 3, 2019 at 7:34 AM Louki Sumirniy <louki.sumirniy.stal...@gmail.com> wrote: > > The ellipsis has two uses in Go, one is in variadic parameters, the other is > in the slice append operator. It is essentially an iterator that takes a list > and turns it into a slice (parameters) or takes a slice and turns it into a > recursive iteration (append). Parameters with the ellipsis are addressed > inside the function as a slice of the type after the ellipsis.
Note that there is nothing special about append here, it's just like passing a slice to any other variadic parameter. See https://golang.org/ref/spec#Passing_arguments_to_..._parameters . Ian -- 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. For more options, visit https://groups.google.com/d/optout.