[Solved] Why does this goroutine behave like it’s call by reference?


Slices are references to arrays. When modifying a slice without copying it, the underlaying array will be modified. Therefore, all slices that point to the same underlaying array will see this change.

solved Why does this goroutine behave like it’s call by reference?