There is no pass-by-reference in Go

Understand Go pointers in less than 800 words or your money back

Package errors

https://www.sohamkamani.com/golang/arrays-vs-slices/