I would like to see if there is a simple way to replace a portion of a slice with all the values of another slice. For instance:
x := []int{1,2,0,0}
y := []int{3,4}
// goal is x == {1,2,3,4}
x[2:] = y // compile error
x[2:] = y[:] // compile error
I know that I can always iterate through through y, but Go has a bunch of cool features and I'm pretty new to Go. So perhaps I'm going about this the wrong way.