Skip to content

Commit

Permalink
redundant func
Browse files Browse the repository at this point in the history
  • Loading branch information
omerzi committed Mar 4, 2024
1 parent 15c720a commit 1bcc7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/fileutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ func Close(closer io.Closer, err *error) {
if closeErr = closer.Close(); closeErr == nil {
return
}

closeErr = fmt.Errorf("failed to close %T: %w", closer, closeErr)
if err == nil {
err = &closeErr

Check failure on line 250 in io/fileutils.go

View workflow job for this annotation

GitHub Actions / Static-Check

ineffectual assignment to err (ineffassign)

Check failure on line 250 in io/fileutils.go

View workflow job for this annotation

GitHub Actions / Static-Check

ineffectual assignment to err (ineffassign)
return
}
*err = errors.Join(*err, closeErr)
return
}

0 comments on commit 1bcc7bc

Please sign in to comment.