Re:Go: A Surprising Edge Case Concerning Append and Slice Al...
by skj on Saturday May 16, 2015 @09:27AM
(#9556005)
No, nicksardo's understanding was quite correct. Slices are values, and it is impossible to return the same one, because value semantics don't work like that.
The slice returned only points to a new array when the capacity is not large enough to fit additional values.
The slice returned only points to a new array when the capacity is not large enough to fit additional values.