Go语言 之多重继承
package main import ( "fmt" ) type Person03 struct { id int } type Student03 struct { Person03 name string score float64 } type Teacher03 struct { Person03 name string } //Student03与Teacher03都继承于Person03 func main() { var s Student03 = Student03{Person03{1}, "yy", 80} fmt.Println(s) }