I don't understand the difference between a struct literal and a struct pointer when accessing struct fields. Is there any different internal behavior ?
type Person struct {
Name string
}
p := &Person{Name: "Alice"}
u := Person{Name: "Bob"}
fmt.Println(p.Name) // any difference ?
fmt.Println(u.Name) // any difference ?
I searched for this but posts I found all explain about difference between value & pointer, or "passing a value" vs "passing a pointer" to a method. They are not what I want to know.