Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 741 Bytes

pointers-vs-values.md

File metadata and controls

15 lines (11 loc) · 741 Bytes

Pointers vs Values

Pointers and values, what they are and their differences are important to understanding day to day code in Go.
In some cases it is a "Best Practice" or "convention" to use pointers (such as "pointer receivers"), but in another context it is not.

Pointers

// TODO: when are variables passed using a pointer, also in context of maps, slices, etc

Values

// TODO: when are variables passed by value, also in context of maps, slices, etc

Receivers

// TODO: describe receivers and difference between a pointer receiver and value receiver

Resources