You are absolutely correct. To borrow form another's comment, https://play.golang.org/p/VOUJI88PNj
The slice, however, is a small structure to pass to a function in that you are not performing a copy of each individual element in the slice.
The slice, however, is a small structure to pass to a function in that you are not performing a copy of each individual element in the slice.
From "Effective Go":
"We must return the slice afterwards because, although Append can modify the elements of slice, the slice itself (the run-time data structure holding the pointer, length, and capacity) is passed by value."