You must know about the header of Go Slices. Then, you can have your answer yourself.
See what's in a slice header by checking out the reflect.SliceHeader
type:
type SliceHeader struct {
Data uintptr
Len int
Cap int
}
Actually, Slice value is a header, containing the backing array along with the length and the capacity. It contains a pointer to the array of the elements are actually stored. The slice value does not contain the elements (unlike arrays).
So, when a slice is passed or returned, a copy will be passed or returned from this header along with the pointer. This pointer points to the same backed array. So, if you modify the elements of the slice, it modifies the backed array too and so all slices (those share the same backed array) also get the change.
So when you pass a slice to a function, a copy will be made from this header, including the pointer, which will point to the same backing array. Modifying the elements of the slice implies modifying the elements of the backing array, and so all slices which share the same backing array will "observe" the change.
See the blog https://blog.golang.org/go-slices-usage-and-internals.
Ref: Are golang slices passed by value?