Debian Codegraph @

stylecheck/st1020/testdata/go1.18/CheckExportedFunctionDocs/generics.go

raw
1 package pkg
2
3 // Whatever //@ diag(`comment on exported function`)
4 func TPFoo[T any]() {}
5
6 // Whatever //@ diag(`comment on exported function`)
7 func TPBar[T1, T2 any]() {}
8
9 // TPBaz is amazing
10 func TPBaz[T any]() {}
11
12 type TPT[T any] struct{}
13
14 // Foo is amazing
15 func (TPT[T]) Foo() {}
16
17 // Whatever //@ diag(`comment on exported method`)
18 func (TPT[T]) Bar() {}
19
20 type TPT2[T1, T2 any] struct{}
21
22 // Foo is amazing
23 func (TPT2[T1, T2]) Foo() {}
24
25 // Whatever //@ diag(`comment on exported method`)
26 func (*TPT2[T1, T2]) Bar() {}
27
28 // Deprecated: don't use.
29 func TPFooDepr[T any]() {}
30
31 // Deprecated: don't use.
32 func TPBarDepr[T1, T2 any]() {}
33
34 // Deprecated: don't use.
35 func (TPT[T]) BarDepr() {}
36
37 // Deprecated: don't use.
38 func (*TPT2[T1, T2]) BarDepr() {}