8000 refactor: replace `golang.org/x/exp` with stdlib by Juneezee · Pull Request #7131 · nginx/kubernetes-ingress · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Juneezee
Copy link
Contributor

Proposed changes

These experimental packages are now available in the Go standard library.

  1. golang.org/x/exp/slices -> slices (https://go.dev/doc/go1.21#slices)
  2. golang.org/x/exp/maps -> maps (https://go.dev/doc/go1.21#maps)

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto 8000 main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@Juneezee Juneezee requested a review from a team as a code owner January 14, 2025 16:32
Copy link
Contributor
github-actions bot commented Jan 14, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jan 14, 2025
@Juneezee
Copy link
Contributor Author

I have hereby read the F5 CLA and agree to its terms

Copy link
Contributor
@javorszky javorszky left a comment

Choose a reason for hiding this comment

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

Nice, thank you! Notably the signature for maps.Keys changed between the exp package and std library, which is why the slices.Collect is there.

Also checked the rest of the codebase, no other place uses exp/maps or exp/slices.

These experimental packages are now available in the Go standard
library:

	1. golang.org/x/exp/slices -> slices [1]
	2. golang.org/x/exp/maps -> maps [2]

[1]: https://go.dev/doc/go1.21#slices
[2]: https://go.dev/doc/go1.21#maps

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@Juneezee Juneezee requested a review from a team as a code owner January 15, 2025 14:18
@Juneezee
Copy link
Contributor Author

Rebased to fix conflicts.

image

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@javorszky javorszky self-assigned this Jan 16, 2025
@javorszky javorszky mentioned this pull request Jan 16, 2025
6 tasks
@javorszky javorszky enabled auto-merge (squash) January 16, 2025 11:52
@Juneezee
Copy link
Contributor Author

@javorszky Thanks you reviewing and approving the PR 😊 ! Seems like the workflow needs your approval again to run

@javorszky
Copy link
Contributor

@Juneezee it's running 2 more checks at the time of writing this comment. I expect both to finish, and the PR to be merged as soon as both return green.

Thanks for fixing these!

@javorszky
Copy link
Contributor

it's running 2 more checks

only to open up another 16... 😆 Right, working on these

@javorszky javorszky merged commit dec80c7 into nginx:main Jan 16, 2025
112 of 121 checks passed
pdabelf5 pushed a commit that referenced this pull request Jan 30, 2025
* refactor: replace `golang.org/x/exp` with stdlib

These experimental packages are now available in the Go standard
library:

	1. golang.org/x/exp/slices -> slices [1]
	2. golang.org/x/exp/maps -> maps [2]

[1]: https://go.dev/doc/go1.21#slices
[2]: https://go.dev/doc/go1.21#maps

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* Fix TestGetEndpointSlicesBySubselectedPods_GetsEndpointsOnNilValues

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants
0