Debian Codegraph @

test/a/structs.go

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