Skip to content

refactor: replace Split in loops with more efficient SplitSeq#920

Merged
minhd-vu merged 1 commit into
0xPolygon:mainfrom
box4wangjing:main
May 18, 2026
Merged

refactor: replace Split in loops with more efficient SplitSeq#920
minhd-vu merged 1 commit into
0xPolygon:mainfrom
box4wangjing:main

Conversation

@box4wangjing
Copy link
Copy Markdown
Contributor

Description

strings.SplitSeq (introduced in Go 1.23) returns a lazy sequence (strings.Seq), allowing gopher to iterate over tokens one by one without creating an intermediate slice.

More info: golang/go#61901

Inspired by #769 and replace all.

Jira / Linear Tickets

Testing

  • Test A
  • Test B

Signed-off-by: box4wangjing <box4wangjing@outlook.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@minhd-vu minhd-vu left a comment

Choose a reason for hiding this comment

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

Awesome ty!

@minhd-vu minhd-vu merged commit a827340 into 0xPolygon:main May 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants