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

Fix deepsource: CRT-A0014 switch single case can be rewritten if or if-else #1855

Conversation

vankichi
Copy link
Contributor

Description:

I have fixed CRT-A0014.

Related Issue:

Versions:

  • Go Version: 1.19.2
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.8

Checklist:

Special notes for your reviewer:

@cloudflare-pages
Copy link

cloudflare-pages bot commented Nov 22, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe50adb
Status: ✅  Deploy successful!
Preview URL: https://478a7b31.vald.pages.dev
Branch Preview URL: https://refactor-crt-a0014-switch-si.vald.pages.dev

View logs

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Base: 30.54% // Head: 30.54% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (fe50adb) compared to base (d7345dc).
Patch coverage: 75.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1855   +/-   ##
=======================================
  Coverage   30.54%   30.54%           
=======================================
  Files         367      367           
  Lines       33823    33828    +5     
=======================================
+ Hits        10331    10333    +2     
- Misses      23079    23081    +2     
- Partials      413      414    +1     
Impacted Files Coverage Δ
hack/helm/schema/crd/main.go 0.00% <0.00%> (ø)
hack/helm/schema/gen/main.go 0.00% <0.00%> (ø)
internal/cache/cache.go 100.00% <100.00%> (ø)
internal/cache/cacher/cacher.go 100.00% <100.00%> (ø)
...nt/core/ngt/service/vqueue/uninserted_index_map.go 70.43% <0.00%> (-3.23%) ⬇️
internal/errgroup/group.go 94.00% <0.00%> (-1.00%) ⬇️
internal/worker/worker.go 82.30% <0.00%> (-0.77%) ⬇️
internal/net/dialer.go 78.40% <0.00%> (+0.99%) ⬆️
...ent/core/ngt/service/vqueue/undeleted_index_map.go 73.77% <0.00%> (+2.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM

@vankichi vankichi merged commit e8aff80 into main Nov 22, 2022
@vankichi vankichi deleted the refactor/CRT-A0014/switch-single-case-can-be-rewritten-as-if-or-if-else branch November 22, 2022 01:25
@kpango kpango mentioned this pull request Jan 19, 2023
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