| 1 | package subsel |
|---|---|
| 2 | |
| 3 | import "fmt" |
| 4 | |
| 5 | type TestStructSubSub struct { |
| 6 | E string |
| 7 | F int |
| 8 | } |
| 9 | |
| 10 | func (ts TestStructSubSub) SayGood(word string) string { |
| 11 | fmt.Printf("hello good %s", word) |
| 12 | SayGood(word) |
| 13 | return "" |
| 14 | } |
| 15 | |
| 16 | type TestStructSub struct { |
| 17 | E string |
| 18 | F int |
| 19 | Sub TestStructSubSub |
| 20 | } |
| 21 | |
| 22 | func (ts TestStructSub) SayGood(word string) { |
| 23 | fmt.Printf("hello good %s", word) |
| 24 | } |
| 25 | |
| 26 | type TestStruct struct { |
| 27 | A string |
| 28 | B int |
| 29 | C TestStructSub |
| 30 | TestASN string |
| 31 | } |
| 32 | |
| 33 | func (ts TestStruct) SayGood(word string) TestStruct { |
| 34 | fmt.Printf("hello good %s", word) |
| 35 | SayGood(word) |
| 36 | return TestStruct{} |
| 37 | } |
| 38 | |
| 39 | func SayGood(word string) TestStruct { |
| 40 | fmt.Printf("hello good %s", word) |
| 41 | return TestStruct{} |
| 42 | } |
| 43 | |
| 44 | func (ts TestStruct) SayGoodTestStruct(word string) TestStruct { |
| 45 | fmt.Printf("hello good %s", word) |
| 46 | return TestStruct{} |
| 47 | } |
| 48 | |
| 49 | func SayGoodTestWhile(word string) TestStruct { |
| 50 | fmt.Printf("hello good %s", word) |
| 51 | return TestStruct{} |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | * |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | */ |
| 69 | func (ts TestStruct) SayGoodTest(word string) TestStructSub { |
| 70 | fmt.Printf("hello good %s", word) |
| 71 | ts.SayGood("") |
| 72 | return TestStructSub{} |
| 73 | } |
| 74 |
Members