3 ms·
It doesn't explode the slice: If the final argument is assignable to a slice type []T, it may be passed unchanged as the value for a ...T parameter if the argu
by danieldk 10y ago
It doesn't explode the slice:
If the final argument is assignable to a slice type []T, it may be passed unchanged as the value for a ...T parameter if the argument is followed by .... In this case no new slice is created.
https://golang.org/ref/spec#Passing_arguments_to_..._parameters https://golang.org/ref/spec#Passing_arguments_to_..._paramet...
(Otherwise, I completely agree that having to use append to remove an element is stupid.)