github.com/golangci/go-tools@v0.0.0-20190318060251-af6baa5dc196/staticcheck/testdata/src/CheckBenchmarkN/CheckBenchmarkN.go (about)

     1  package foo
     2  
     3  import "testing"
     4  
     5  func foo() {
     6  	var b *testing.B
     7  	b.N = 1 // MATCH /should not assign to b.N/
     8  	_ = b
     9  }