Slide 10
Slide 10 text
Why?
The number of elements copied by the copy function is min(a, b).
Therefore, the destination slice, a, must be allocated with enough space
for len(b) elements.
”Both arguments must have identical element type T and must be assignable to a
slice of type []T. The number of elements copied is the minimum of len(src) and
len(dst). As a special case, copy also accepts a destination argument assignable
to type []byte with a source argument of a string type.”
https://golang.org/ref/spec#Appending_and_copying_slices