I don't know why Go given this following result. I think that a1 and a2 are two distinct pointers?
&{} !
Code
func main() {
a1 := &A{}
a2 := &A{}
a3 := &A{}
m2 := make(map[*A]string)
m2[a1] = "hello"
m2[a2] = "world"
m2[a3] = "!"
for k, v := range m2 {
fmt.Println(k, v)
}
}
type A struct {
}