// 11.go package main import "fmt"
func main() { var is []interface{} fmt.Println(is...) var t3 T3 t3.T1.a = 5 t3.T2.a = 3 t3.T1.f() // 5 t3.T2.f() // 3 t3.f() // 5 // <-> t3.T1.f() t3.a = 7 // <=> t3.T1.a = 7 t3.T1.f() // 7 t3.T2.f() // 3 } type T1 struct { a int } func (t T1) f() { fmt.Println(t.a) } type T2 struct { T1 //a int } type T3 struct { T1 T2 } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.