In most languages (like c++) passing arrays result in implicitly passing it by a reference, so any changes to the passed array in the function will result in changing the origin
What you are defining is not array but a slice of an array which is passed by reference as specified in golang documentation. Check this link.
array
slice