Go slices are very powerful and it would not be an exaggeration to say that slices could totally replace the use of arrays in Go. There are only a few occasions when you will need to use an array instead of a slice. The most obvious one is when you are absolutely sure that you will need to store a fixed number of elements.
As slices are passed by reference to functions, which means that what is actually passed is the memory address of the slice variable, any modifications you make to a slice inside a function will not get lost after the function exits. Additionally, passing a big slice to a function is significantly faster than passing an array with the same number of elements because Go will not have to make a copy of the slice; it will just pass the memory...