github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/predeclared.go (about) 1 //golangcitest:args -Epredeclared 2 package testdata 3 4 func hello() { 5 var real int // want "variable real has same name as predeclared identifier" 6 a := A{} 7 copy := Clone(a) // want "variable copy has same name as predeclared identifier" 8 9 // suppress any "declared but not used" errors 10 _ = real 11 _ = a 12 _ = copy 13 } 14 15 type A struct { 16 true bool 17 foo int 18 } 19 20 func Clone(a A) A { 21 return A{ 22 true: a.true, 23 foo: a.foo, 24 } 25 } 26 27 func recover() {} // want "function recover has same name as predeclared identifier"