refactor: use slices.Contains to simplify code
Proposed changes
There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.
Types of changes
- [ ] Bug fix
- [ ] New feature added
- [ ] Documentation Update
Please make sure to follow these points
- [x] I have read the contributing guidelines.
- [x] I have performed a self-review of my own code or work.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] My changes generates no new warnings.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] My changes have sufficient code coverage (unit, integration, e2e tests).
Screenshots (If Applicable)
Other Information
Any message for the reviewer or kick off the discussion by explaining why you considered this particular solution, any alternatives etc.
Ah nice, thanks for the contribution!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.96%. Comparing base (
4d12264) to head (e5d79e3). Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1685 +/- ##
=======================================
Coverage 99.96% 99.96%
=======================================
Files 342 342
Lines 30439 30439
=======================================
Hits 30427 30427
Misses 8 8
Partials 4 4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Ah nice, thanks for the contribution!
My pleasure.
Thanks for your review!