close
Skip to content

refactor: replace Split in loops with more efficient SplitSeq and replace HasPrefix+TrimPrefix with CutPrefix#13810

Merged
glours merged 1 commit into
docker:mainfrom
caltechustc:main
Jun 5, 2026
Merged

refactor: replace Split in loops with more efficient SplitSeq and replace HasPrefix+TrimPrefix with CutPrefix#13810
glours merged 1 commit into
docker:mainfrom
caltechustc:main

Conversation

@caltechustc

@caltechustc caltechustc commented May 23, 2026

Copy link
Copy Markdown
Contributor

What I did

Optimize code using a more modern writing style which can make the code more efficient and cleaner.

And also use strings.CutPrefix for clearer and more idiomatic prefix handling.

More info: golang/go#61901

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

image

…lace HasPrefix+TrimPrefix with CutPrefix

Signed-off-by: caltechustc <caltechustc@outlook.com>
@caltechustc caltechustc requested a review from a team as a code owner May 23, 2026 12:11
@caltechustc caltechustc requested review from glours and ndeloof May 23, 2026 12:11
@caltechustc

Copy link
Copy Markdown
Contributor Author

@glours @ndeloof Hi, Could you please review this PR at your convenience? Thank you very much.

@glours glours left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@glours glours merged commit 5d67ce6 into docker:main Jun 5, 2026
41 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