Skip to content
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

Solve errcheck warnings (part 4) #2003

Merged
merged 5 commits into from
Jul 9, 2024

Conversation

Honny1
Copy link
Member

@Honny1 Honny1 commented Jul 8, 2024

This PR is one of several fixes of warnings found by golangci when the errcheck linter is enabled.

Partially fixes:

@Honny1 Honny1 marked this pull request as ready for review July 8, 2024 12:39
defer c.zstdReader.Reset(nil)
defer func() {
if err := c.zstdReader.Reset(nil); err != nil {
logrus.Warn(err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add at least a bit of context.

(Or, alternatively, return the error from appendCompressedStreamToFile, because any future uses of zstdReader would likely not work correctly if this ever failed.)

Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks!

@mtrmac
Copy link
Collaborator

mtrmac commented Jul 9, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Jul 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Honny1, mtrmac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jul 9, 2024
@openshift-ci openshift-ci bot removed the lgtm label Jul 9, 2024
@Honny1 Honny1 requested a review from mtrmac July 9, 2024 14:47
@mtrmac
Copy link
Collaborator

mtrmac commented Jul 9, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 9, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit ba0e86e into containers:main Jul 9, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants