Who can tell (or link where to read), why when a type do implementing an interface there is a difference in behavior (depending on how to transfer the recipient)? Here so it works:
type GetNamer interface {
GetName()
}
type Person struct {
PersonName string
}
func (p Person) GetName() {
fmt.Println(p.PersonName)
}
type Data []GetNamer
var d = Data{
Person{"Vasya"},
}
But, if I pass the recipient by the link: (p *Person) I get an error that types (Person and GetNamer) do not match.