github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckUnreadVariableValues_test.go (about) 1 package pkg 2 3 import "testing" 4 5 func fn() int { println(); return 0 } 6 7 func TestFoo(t *testing.T) { 8 x := fn() // MATCH "never used" 9 x = fn() 10 println(x) 11 } 12 13 func ExampleFoo() { 14 x := fn() 15 x = fn() 16 println(x) 17 }