Skip to content

update:simplify slice lookup by using slices.Contains() #5084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025

Conversation

me-cs
Copy link
Contributor

@me-cs me-cs commented Aug 14, 2025

No description provided.

Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kevwan kevwan force-pushed the optimize_slice_find branch from 3f3f23f to 64f853c Compare August 14, 2025 15:15
@kevwan kevwan requested a review from Copilot August 14, 2025 15:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies slice lookup logic by replacing a manual loop with the standard library's slices.Contains() function. The change improves code readability and maintainability by using a more idiomatic Go approach.

  • Replaces manual slice iteration with slices.Contains() for checking if a value exists in options
  • Adds import for the slices package
  • Removes unnecessary variables and loop logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kevwan kevwan added this pull request to the merge queue Aug 14, 2025
Merged via the queue into zeromicro:master with commit f0a3d21 Aug 14, 2025
5 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