type Parent struct{} func (c *Parent) Print() { fmt.Println("parent") } type Child struct { Parent } func (p *Child) Print() { fmt.Println("child") } func main() { var child Child child.Print() }