honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/stylecheck/st1020/testdata/src/example.com/CheckExportedFunctionDocs/generics.go (about) 1 //go:build go1.18 2 3 package pkg 4 5 // Whatever //@ diag(`comment on exported function`) 6 func TPFoo[T any]() {} 7 8 // Whatever //@ diag(`comment on exported function`) 9 func TPBar[T1, T2 any]() {} 10 11 // TPBaz is amazing 12 func TPBaz[T any]() {} 13 14 type TPT[T any] struct{} 15 16 // Foo is amazing 17 func (TPT[T]) Foo() {} 18 19 // Whatever //@ diag(`comment on exported method`) 20 func (TPT[T]) Bar() {} 21 22 type TPT2[T1, T2 any] struct{} 23 24 // Foo is amazing 25 func (TPT2[T1, T2]) Foo() {} 26 27 // Whatever //@ diag(`comment on exported method`) 28 func (*TPT2[T1, T2]) Bar() {}