Skip to content

refactor: use slices.Contains to simplify code#7039

Merged
mholt merged 1 commit intocaddyserver:masterfrom
tongjicoder:master
May 31, 2025
Merged

refactor: use slices.Contains to simplify code#7039
mholt merged 1 commit intocaddyserver:masterfrom
tongjicoder:master

Conversation

@tongjicoder
Copy link
Copy Markdown
Contributor

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 27, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Member

@mohammed90 mohammed90 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! I think they can be simplified further. I've added the suggestion comments. Let me know what you think.

@tongjicoder
Copy link
Copy Markdown
Contributor Author

@mohammed90 Good idea! Thank you for your suggestion; I further simplified the code. Please review it again.

Signed-off-by: tongjicoder <tongjicoder@icloud.com>
@mholt mholt merged commit 5b2eb66 into caddyserver:master May 31, 2025
20 checks passed
@mholt mholt added this to the v2.10.1 milestone May 31, 2025
SPPRAGUE

This comment was marked as spam.

mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
Signed-off-by: tongjicoder <tongjicoder@icloud.com>
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.

5 participants