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

Prefer strings.Cut to strings.SplitN(..., 2) #11758

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

serprex
Copy link

@serprex serprex commented Nov 26, 2024

No description provided.

@serprex serprex requested a review from a team as a code owner November 26, 2024 17:29
@serprex serprex requested a review from bogdandrutu November 26, 2024 17:29
Copy link

linux-foundation-easycla bot commented Nov 26, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.62%. Comparing base (7c26397) to head (e3bc69f).
Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11758      +/-   ##
==========================================
- Coverage   91.62%   91.62%   -0.01%     
==========================================
  Files         447      447              
  Lines       23739    23735       -4     
==========================================
- Hits        21751    21747       -4     
  Misses       1613     1613              
  Partials      375      375              

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

@serprex
Copy link
Author

serprex commented Nov 27, 2024

Should add Skip Changelog to Labels

@dmathieu
Copy link
Member

I'm not sure this doesn't need a changelog entry.
While readability improvements definitely don't, switching from strings.Cut to strings.SplitN also reduces the number of allocations. So it's a small improvement in memory use.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 21, 2024
.chloggen/strings-cut.yaml Outdated Show resolved Hide resolved
@mx-psi mx-psi enabled auto-merge December 23, 2024 09:59
Copy link
Contributor

github-actions bot commented Jan 7, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 7, 2025
@mx-psi
Copy link
Member

mx-psi commented Jan 7, 2025

@serprex Can you fix the linting failures?

Error: identifiable.go:130:10: indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)

Sorry, it seems I enabled automerge but the PR didn't go through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants