firefly icon indicating copy to clipboard operation
firefly copied to clipboard

refactor: use slices.Contains to simplify code

Open pullmerge opened this issue 8 months ago • 4 comments

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.

pullmerge avatar May 21 '25 07:05 pullmerge

Ah nice, thanks for the contribution!

EnriqueL8 avatar May 23 '25 10:05 EnriqueL8

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.

codecov[bot] avatar May 23 '25 10:05 codecov[bot]

Ah nice, thanks for the contribution!

My pleasure.

pullmerge avatar May 23 '25 11:05 pullmerge

Thanks for your review!

pullmerge avatar May 28 '25 13:05 pullmerge