github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/test/testdata/errcheck_exclude.go (about)

     1  //golangcitest:args -Eerrcheck
     2  //golangcitest:config_path testdata/configs/errcheck_exclude.yml
     3  package testdata
     4  
     5  import (
     6  	"io/ioutil"
     7  )
     8  
     9  func TestErrcheckExclude() []byte {
    10  	ret, _ := ioutil.ReadFile("f.txt")
    11  	return ret
    12  }
    13  
    14  func TestErrcheckNoExclude() []byte {
    15  	ret, _ := ioutil.ReadAll(nil) // want "Error return value of `ioutil.ReadAll` is not checked"
    16  	return ret
    17  }