Skip to content

fix: use idiomatic Go boolean check in store_redis.go#316

Open
HarshitPal25 wants to merge 1 commit into
volcano-sh:mainfrom
HarshitPal25:fix/idiomatic-bool-store-redis
Open

fix: use idiomatic Go boolean check in store_redis.go#316
HarshitPal25 wants to merge 1 commit into
volcano-sh:mainfrom
HarshitPal25:fix/idiomatic-bool-store-redis

Conversation

@HarshitPal25
Copy link
Copy Markdown
Contributor

Description:
What type of PR is this?

/kind cleanup

What this PR does / why we need it:
Replaces if ok == false with if !ok in store_redis.go. The Go Code Review Comments wiki and golint/revive linters recommend against comparing boolean values to true/false explicitly. 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?:

NONE

Copilot AI review requested due to automatic review settings May 11, 2026 10:28
@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yaozengzeng for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors a boolean comparison in pkg/store/store_redis.go to use the more idiomatic !ok syntax. I have no feedback to provide as there were no review comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 == false with if !ok in pkg/store/store_redis.go.

Comment thread pkg/store/store_redis.go Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 11, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.74%. Comparing base (524e55e) to head (a927d93).
⚠️ Report is 41 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     
Flag Coverage Δ
unittests 47.74% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings May 11, 2026 10:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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>
@HarshitPal25 HarshitPal25 force-pushed the fix/idiomatic-bool-store-redis branch from 6f38fbf to a927d93 Compare May 11, 2026 18:39
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.

4 participants