-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: check errReadRespBody != nil
but return a nil value error err
#2470
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
Conversation
Signed-off-by: alingse <alingse@foxmail.com>
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
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.
Thank you and congratulations 🎉 for opening your very first pull request in keploy
hey @alingse the changes look good, you can surely add the defer body close code in the same PR. |
I have read the CLA Document and I hereby sign the CLA |
add defer httpResp.Body.Close() Signed-off-by: alingse <alingse@foxmail.com>
Hey @alingse the linter pipeline is breaking, please fix the same! |
ok, I will fix it later(after work) |
Signed-off-by: alingse <alingse@foxmail.com>
Signed-off-by: alingse <alingse@foxmail.com>
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.
the linter is failing perhaps running gofmt can fix it
@shivamsouravjha I have update the commit , go fmt the file. |
What does this PR do?
fix a bug
btw, there should add a
defer httpResp.Body.Close()
Related PRs and Issues
I create a linter to detect code that returns a non-relevant nilness error bug. I checked the top 1000 GitHub Go repositories and found this, all result listed in alingse/sundrylint#4
Closes: #[issue number that will be closed through this PR]
Type of change
Please let us know test plan followed
Please describe the tests(if any). Provide instructions how its affecting the coverage.
Checklist: