github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckRegexpMatchLoop.go (about)

     1  package pkg
     2  
     3  import "regexp"
     4  
     5  func fn() {
     6  	regexp.Match("", nil)
     7  	regexp.MatchString("", "")
     8  	regexp.MatchReader("", nil)
     9  
    10  	for {
    11  		regexp.Match("", nil)       // MATCH /calling regexp.Match in a loop has poor performance/
    12  		regexp.MatchString("", "")  // MATCH /calling regexp.MatchString in a loop has poor performance/
    13  		regexp.MatchReader("", nil) // MATCH /calling regexp.MatchReader in a loop has poor performance/
    14  	}
    15  }