Structs Pass by Value in Golang.

preview_player
Показать описание
In Go, structs are passed by value, not by reference. When you pass a struct to a function as an argument, a copy of the entire struct is created and passed to the function. This means that any modifications made to the struct inside the function will not affect the original struct that was passed.
Рекомендации по теме