In order to get the best out of "slices" and use them properly, we need to have a good grasp of the internals of them. They're composed of three machine words:
These three items together form what's called Slice Header. When you pass a slice as an argument to a function, you are actually passing a copy of this header. Therefore whatever change done on the copy of this header, is not visible to the original slice created at the main function and it remains intact.