package model import "fmt" //多态 type Live interface { run() } type People struct { name string } type Animal struct { name string } func (p *People) run() { fmt.Printf("%v在跑步", p.name) } func (a *Animal) run() { fmt.Printf("%v在跑步", a.name) } func allrun(live Live) { live.run() }