github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/staticcheck/sa4006/testdata/src/example.com/CheckUnreadVariableValues/CheckUnreadVariableValues_test.go (about)

     1  package pkg
     2  
     3  import "testing"
     4  
     5  func TestFoo(t *testing.T) {
     6  	x := fn() //@ diag(`never used`)
     7  	x = fn()
     8  	println(x)
     9  }
    10  
    11  func ExampleFoo() {
    12  	x := fn()
    13  	x = fn()
    14  	println(x)
    15  }