Skip to content

Commit 402fc82

Browse files
committed
chore: golangci-lint
1 parent f6c9465 commit 402fc82

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/e2e/frmwrk/shared.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,17 @@ func copyFile(src, dst string) error {
605605
if err != nil {
606606
return err
607607
}
608-
defer sourceFile.Close()
608+
defer func() {
609+
Expect(sourceFile.Close()).ToNot(HaveOccurred(), "cannot close source file")
610+
}()
609611

610612
destinationFile, err := os.Create(dst)
611613
if err != nil {
612614
return err
613615
}
614-
defer destinationFile.Close()
616+
defer func() {
617+
Expect(destinationFile.Close()).ToNot(HaveOccurred(), "cannot close destination file")
618+
}()
615619

616620
_, err = io.Copy(destinationFile, sourceFile)
617621
if err != nil {

0 commit comments

Comments
 (0)