| 1 | package a |
| 2 | |
| 3 | import "time" |
| 4 | |
| 5 | type Empty interface{} |
| 6 | |
| 7 | // unexported interface |
| 8 | type interfaceA[T any] interface { |
| 9 | // some comment |
| 10 | unexportedFunc() |
| 11 | |
| 12 | // some comment above the function |
| 13 | Method0() |
| 14 | |
| 15 | Method1() string // inline comment |
| 16 | |
| 17 | // multi |
| 18 | // line |
| 19 | // comment |
| 20 | Method2(argA, argB string) (T, int) |
| 21 | |
| 22 | Method3(argA int, argB ...string) (T, []string, error) |
| 23 | } |
| 24 | |
| 25 | // multi |
| 26 | // line |
| 27 | // comment |
| 28 | type InterfaceB interface { |
| 29 | Empty |
| 30 | interfaceA[int] |
| 31 | |
| 32 | // "replace" Method0 from interfaceA |
| 33 | Method0() |
| 34 | |
| 35 | CustomMethod() time.Time |
| 36 | } |