github.com/golangCi/golangCi-lint@v1.10.1/test/testdata/withtests/p.go (about) 1 package withtests 2 3 import "fmt" 4 5 var varUsedOnlyInTests bool 6 7 func usedOnlyInTests() {} 8 9 type someType struct { 10 fieldUsedOnlyInTests bool 11 fieldUsedHere bool 12 } 13 14 func usedHere() { 15 v := someType{ 16 fieldUsedHere: true, 17 } 18 fmt.Println(v) 19 } 20 21 func init() { 22 usedHere() 23 }