-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop some minimally-used dependencies #2364
Conversation
See also #2365. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
oci/layout/oci_delete_test.go
Outdated
return err | ||
} | ||
if _, err := io.Copy(dest, src); err != nil { | ||
_ = dest.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just defer the dest.Close()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t want just defer dest.Close()
because a failure in Close
after writing could have been significant.
But that’s a good point — doing the error checking in a defer
is not actually all that more complex, and better for peace of mind. Fixed.
This is mostly a formality, we still depend on it indirectly. Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
LGTM |
… to try and decrease our exposure to risk, where it is trivially cheap to do so.
See individual commit messages for details.