2021-06-15 11:36:41 +02:00
|
|
|
package fixtures
|
|
|
|
|
|
|
|
type Foo struct {
|
|
|
|
Bar struct { // MATCH /no nested structs are allowed/
|
|
|
|
Baz struct { // MATCH /no nested structs are allowed/
|
|
|
|
b bool
|
|
|
|
Qux struct { // MATCH /no nested structs are allowed/
|
|
|
|
b bool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Quux struct {
|
|
|
|
Quuz Quuz
|
|
|
|
}
|
|
|
|
|
|
|
|
type Quuz struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func waldo() (s struct{ b bool }) { return s }
|
|
|
|
|
|
|
|
func fred() interface{} {
|
|
|
|
s := struct {
|
|
|
|
b bool
|
|
|
|
t struct { // MATCH /no nested structs are allowed/
|
|
|
|
b bool
|
|
|
|
}
|
|
|
|
}{}
|
|
|
|
|
|
|
|
return s
|
|
|
|
}
|
2022-03-31 17:40:26 +02:00
|
|
|
|
|
|
|
// issue 664
|
|
|
|
type Bad struct {
|
|
|
|
Field []struct{} // MATCH /no nested structs are allowed/
|
|
|
|
}
|
2022-09-05 11:11:45 +02:00
|
|
|
|
|
|
|
// issue744
|
|
|
|
type issue744 struct {
|
|
|
|
c chan struct{}
|
|
|
|
}
|
2023-01-26 23:50:35 +02:00
|
|
|
|
|
|
|
// issue 781
|
|
|
|
type mySetInterface interface {
|
|
|
|
GetSet() map[string]struct{}
|
|
|
|
}
|