| 1 |
package a |
| 2 |
|
| 3 |
type unexported struct { |
| 4 |
field0 string |
| 5 |
Field1 string |
| 6 |
} |
| 7 |
|
| 8 |
|
| 9 |
type structA struct { |
| 10 |
Field1 string |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
Field2 []byte |
| 17 |
} |
| 18 |
|
| 19 |
func (s structA) method0() {} |
| 20 |
|
| 21 |
|
| 22 |
func (s structA) Method1(arg1 int) {} |
| 23 |
|
| 24 |
func (s *structA) Method2(arg1 int, arg2 ...string) {} |
| 25 |
|
| 26 |
|
| 27 |
type StructB[T any] struct { |
| 28 |
*unexported |
| 29 |
structA |
| 30 |
|
| 31 |
Field3 T |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
func (s *StructB[T]) Method3(arg1 int) (a int, b string, c error) { |
| 36 |
return |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
type StructC[A string, B, C any] struct { |
| 41 |
Field4 A |
| 42 |
Field5 B |
| 43 |
Field6 C |
| 44 |
} |
| 45 |
|
| 46 |
|
| 47 |
func (s *StructC[A, B, C]) Method4(arg1 A) (a B, b C, c error) { |
| 48 |
return |
| 49 |
} |