Skip to content

Use more efficient SplitSeq instead of Split #38157

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

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

tklauser
Copy link
Member

Replace Split in for range strings.Split(...) by Go 1.24's more efficient, iterators-based strings.SplitSeq.

Generated using modernize by running:

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

and committing the relevant changes with some minor manual edits.

@tklauser tklauser added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. labels Mar 12, 2025
@tklauser tklauser requested review from a team as code owners March 12, 2025 13:26
@tklauser tklauser changed the title Use more efficient SplitSeq instead of Split Use more efficient SplitSeq instead of Split Mar 12, 2025
@github-actions github-actions bot added hubble-cli PRs or GitHub issues related with hubble-cli cilium-cli This PR contains changes related with cilium-cli labels Mar 12, 2025
@tklauser
Copy link
Member Author

/test

@tklauser tklauser enabled auto-merge March 12, 2025 13:27
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@smagnani96 smagnani96 left a comment

Choose a reason for hiding this comment

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

Changes for encryption files LGTM, thanks!

Copy link
Member

@nathanjsweet nathanjsweet left a comment

Choose a reason for hiding this comment

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

Cool!

Copy link
Contributor

@tommyp1ckles tommyp1ckles left a comment

Choose a reason for hiding this comment

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

👍 on metrics

Replace Split in "for range strings.Split(...)" by Go 1.24's more
efficient, iterators-based strings.SplitSeq.

Generated using modernize by running:

    go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

and committing the relevant changes with some minor manual edits.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser force-pushed the pr/tklauser/splitseq branch from abdece1 to f47f617 Compare March 20, 2025 10:35
@tklauser
Copy link
Member Author

/test

@tklauser
Copy link
Member Author

Rebased to resolve merge conflict.

@aditighag could you please take a look? Would be nice to have this merged before it picks up another merge conflict.

@tklauser
Copy link
Member Author

@cilium/contributing @aditighag gentle ping for review

Copy link
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Reviewing for contributing because it makes me sad to see such a straightforward PR having to go through that many reviews.

@tklauser tklauser added this pull request to the merge queue Mar 25, 2025
Merged via the queue into main with commit ed3f048 Mar 25, 2025
288 checks passed
@tklauser tklauser deleted the pr/tklauser/splitseq branch March 25, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli hubble-cli PRs or GitHub issues related with hubble-cli kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.