I'm giving a try to golang embedding and the following code doesn't compile:
type Parent struct {}
func (p *Parent) Foo() {
}
type Child struct {
p *Parent
}
func main() {
var c Child
c.Foo()
}
with
./tmp2.go:18:3: c.Foo undefined (type Child has no field or method Foo)
What I am doing wrong?