6 ms·
No, it's definitely passed by value: https://go.dev/play/p/mIehOwUWz95 https://go.dev/play/p/mIehOwUWz95 A map is implicitly a pointer to the underlying map s
by leg100 2y ago
No, it's definitely passed by value:
https://go.dev/play/p/mIehOwUWz95 https://go.dev/play/p/mIehOwUWz95
A map is implicitly a pointer to the underlying map structure. When you pass a map, you're passing a copy of a pointer.