My object is not updated even if I use the pointer to a type to update it
问题 I store some Individual objects in a slice. Before appending it to the slice I print the name of the Individual object. After I have stored it in the slice, I then retrieve it as a pointer and want to change the name to "Peter" , but the change does not work since it still prints "Steve" . Why? type Individual interface { GetName() *string SetName(name string) } type Person struct { name string } // Implement functions of the Individual interface func (p Person) GetName() *string { return &p