Skip to content
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

Use go1.21 slices package functions in tests #524

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Feb 27, 2025

Updates #464

Go 1.21 introduced the slices package, so we can replace some code by using it to improve readability and maintenance.

This PR simplifies insertion and removal for slices in test code by using these slices pkg functions:

  • slices.Insert()
  • slices.Delete()

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Go 1.21 introduced the slices package, so we can replace some
code by using it to improve readability and maintenance.

This commit simplifies insertion and removal for slices
in test code by using these slices pkg functions:
- slices.Insert()
- slices.Delete()
@fxamacker fxamacker self-assigned this Feb 27, 2025
@fxamacker fxamacker requested a review from turbolent as a code owner February 27, 2025 15:48
@fxamacker fxamacker changed the base branch from fxamacker/lint to main March 1, 2025 02:17
@fxamacker
Copy link
Member Author

@turbolent PTAL 🙏

I can start merging some of the subsequent PRs you already reviewed after this one is merged.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

@fxamacker fxamacker merged commit dfa10cb into main Mar 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants