fix: use idiomatic Go boolean check in store_redis.go#316
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR performs a small cleanup in the Redis store implementation by switching a boolean comparison to idiomatic Go (if !ok) in redisStore.UpdateSandbox, aligning with common Go linting guidance.
Changes:
- Replace
if ok == falsewithif !okinpkg/store/store_redis.go.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #316 +/- ##
==========================================
+ Coverage 47.57% 47.74% +0.17%
==========================================
Files 30 30
Lines 2819 2855 +36
==========================================
+ Hits 1341 1363 +22
- Misses 1338 1344 +6
- Partials 140 148 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace `if ok == false` with `if !ok` per Go style conventions. The Go Code Review Comments wiki and golint both recommend against comparing boolean values to true/false explicitly. Signed-off-by: HarshitPal25 <harshit13082006@gmail.com>
6f38fbf to
a927d93
Compare
Description:
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Replaces
if ok == falsewithif !okinstore_redis.go. The Go Code Review Comments wiki andgolint/revivelinters recommend against comparing boolean values totrue/falseexplicitly. The idiomatic Go form uses the negation operator directly.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: