Skip to content

Commit 5358c95

Browse files
committed
TestGraphdriverPluginV2: SA5001: should check returned error before deferring (staticcheck)
``` integration/plugin/graphdriver/external_test.go:427:2: SA5001: should check returned error before deferring responseReader.Close() (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent fd65fed commit 5358c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

integration/plugin/graphdriver/external_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ func TestGraphdriverPluginV2(t *testing.T) {
424424
RemoteRef: plugin,
425425
AcceptAllPermissions: true,
426426
})
427-
defer responseReader.Close()
428427
assert.NilError(t, err)
428+
defer responseReader.Close()
429429
// ensure it's done by waiting for EOF on the response
430430
_, err = io.Copy(ioutil.Discard, responseReader)
431431
assert.NilError(t, err)

0 commit comments

Comments
 (0)