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

     1  package pkg
     2  
     3  import (
     4  	"errors"
     5  	"fmt"
     6  )
     7  
     8  func fn() {
     9  	_ = fmt.Errorf("%d", 0)
    10  	_ = errors.New("")
    11  	_ = errors.New(fmt.Sprintf("%d", 0)) // MATCH "should use fmt.Errorf"
    12  }