Skip to content

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

Open
box4wangjing wants to merge 1 commit into
0xPolygon:mainfrom
box4wangjing:main
Open

refactor: replace Split in loops with more efficient SplitSeq#920
box4wangjing wants to merge 1 commit into
0xPolygon:mainfrom
box4wangjing:main

Conversation

@box4wangjing
Copy link
Copy Markdown

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

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.

1 participant