Skip to content

Use more efficient SplitSeq instead of Split#38157

Merged
tklauser merged 1 commit intomainfrom
pr/tklauser/splitseq
Mar 25, 2025
Merged

Use more efficient SplitSeq instead of Split#38157
tklauser merged 1 commit intomainfrom
pr/tklauser/splitseq

Conversation

@tklauser
Copy link
Copy Markdown
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
Copy Markdown
Member Author

/test

@tklauser tklauser enabled auto-merge March 12, 2025 13:27
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <[email protected]>
@tklauser tklauser force-pushed the pr/tklauser/splitseq branch from abdece1 to f47f617 Compare March 20, 2025 10:35
@tklauser
Copy link
Copy Markdown
Member Author

/test

@tklauser
Copy link
Copy Markdown
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
Copy Markdown
Member Author

@cilium/contributing @aditighag gentle ping for review

Copy link
Copy Markdown
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.