Back to Developer Roadmap

Pointers with Maps & Slices

src/data/roadmaps/golang/content/[email protected]

4.0548 B
Original Source

Pointers with Maps & Slices

Maps and slices are reference types - passing them to functions doesn't copy underlying data. Modifications inside functions affect original. No need for explicit pointers. However, reassigning the slice/map variable itself won't affect caller unless using pointer.

Visit the following resources to learn more: