File tree 1 file changed +4
-4
lines changed
pkg/golinters/errcheck/testdata
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func IgnoreCloseMissingErrHandling() error {
21
21
return err
22
22
}
23
23
24
- f .Close ()
24
+ f .Close () // want "Error return value of `f.Close` is not checked"
25
25
return nil
26
26
}
27
27
@@ -30,14 +30,14 @@ func IgnoreCloseInDeferMissingErrHandling() {
30
30
if err != nil {
31
31
panic (err )
32
32
}
33
- defer resp .Body .Close ()
33
+ defer resp .Body .Close () // want "Error return value of `resp.Body.Close` is not checked"
34
34
35
35
panic (resp )
36
36
}
37
37
38
38
func 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"
41
41
}
42
42
43
43
func IgnoreBufferWrites (buf * bytes.Buffer ) {
You can’t perform that action at this time.
0 commit comments