1
0
Fork 0
golang-github-pocketbase-ty.../test/a/structs.go
Daniel Baumann b6e042e2af
Adding upstream version 0.0~git20250307.c2e6a77.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 11:21:48 +02:00

49 lines
769 B
Go

package a
type unexported struct {
field0 string
Field1 string
}
// structA comment
type structA struct {
Field1 string // after
// multi
// line
// comment
// with union type
Field2 []byte
}
func (s structA) method0() {}
// method comment
func (s structA) Method1(arg1 int) {}
func (s *structA) Method2(arg1 int, arg2 ...string) {} // after
// structB comment
type StructB[T any] struct {
*unexported
structA
Field3 T
}
// StructB.Method3 comment
func (s *StructB[T]) Method3(arg1 int) (a int, b string, c error) {
return
}
// structC with multiple mixed generic types
type StructC[A string, B, C any] struct {
Field4 A
Field5 B
Field6 C
}
// StructC.Method4 comment
func (s *StructC[A, B, C]) Method4(arg1 A) (a B, b C, c error) {
return
}