I am just playing around with Go and do not yet have a good mental model of when structs are passed by value or by reference.
This may be a very dumb question but I
How do I print the pointer value of a Go object?
package main import ( "fmt" ) func main() { a := 42 fmt.Println(&a) }
results in:
0x1040a124
What does the pointer value mean?
According to Wikipedia:
A pointer references a location in memory