File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
pkg/golinters/errcheck/testdata Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func IgnoreCloseMissingErrHandling() error {
2121 return err
2222 }
2323
24- f .Close ()
24+ f .Close () // want "Error return value of `f.Close` is not checked"
2525 return nil
2626}
2727
@@ -30,14 +30,14 @@ func IgnoreCloseInDeferMissingErrHandling() {
3030 if err != nil {
3131 panic (err )
3232 }
33- defer resp .Body .Close ()
33+ defer resp .Body .Close () // want "Error return value of `resp.Body.Close` is not checked"
3434
3535 panic (resp )
3636}
3737
3838func IgnoreStdxWrite () {
39- os .Stdout .Write ([]byte {})
40- os .Stderr .Write ([]byte {})
39+ os .Stdout .Write ([]byte {}) // want "Error return value of `os.Stdout.Write` is not checked"
40+ os .Stderr .Write ([]byte {}) // want "Error return value of `os.Stderr.Write` is not checked"
4141}
4242
4343func IgnoreBufferWrites (buf * bytes.Buffer ) {
You can’t perform that action at this time.
0 commit comments