Understanding Addressability in Go: Pitfalls with Maps and Structs
Introduction
Let's begin by examining the following code snippet and predicting the output.
type human struct {
age int
name string
}
func main() {
m := make(map[string]human)
h := human{
age: 20,
name: "John",
...
dougtake.hashnode.dev5 min read