Merged
Conversation
Member
Author
|
/test |
ed499c7 to
12cb4b8
Compare
Member
Author
|
/test |
a43d9f4 to
0d563f2
Compare
Member
Author
|
/test |
wedaly
approved these changes
Apr 3, 2025
aanm
approved these changes
Apr 3, 2025
0d563f2 to
f2121a3
Compare
Member
Author
|
/test Rebased to resolve merge conflict |
viktor-kurchenko
approved these changes
Apr 3, 2025
f2121a3 to
94d0bbd
Compare
Member
Author
|
/test Yet another rebase to resolve merge conflicts 😅 |
Replace any 3-clause for i := 0; i < n; i++ {} loop by for i := range n
{}, added in Go 1.22.
Generated using modernize by running:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
and committing the relevant changes.
Signed-off-by: Tobias Klauser <[email protected]>
Replace interface{} by the 'any' type added in Go 1.18.
Generated using modernize by running:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
and committing the relevant changes.
Signed-off-by: Tobias Klauser <[email protected]>
Replace uses of context.WithCancel in tests with testing.T.Context,
added in Go 1.24.
Generated using modernize by running:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
and committing the relevant changes.
Signed-off-by: Tobias Klauser <[email protected]>
Replace []byte(fmt.Sprintf(...)) by fmt.Appendf(nil, ...), added in
Go 1.19.
Generated using modernize by running:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
and committing the relevant changes.
Signed-off-by: Tobias Klauser <[email protected]>
Use testing.B.Loop instead of a manual `for range b.N` loop. This also removes the need to use testing.B.ResetTimer. See golang/go#61515 for details. Generated using modernize by running: go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./... and committing the relevant changes. Signed-off-by: Tobias Klauser <[email protected]>
Replace if/else conditional assignments by a call to the
built-in min or max functions added in Go 1.21.
Generated using modernize by running:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
and committing the relevant changes.
Signed-off-by: Tobias Klauser <[email protected]>
94d0bbd to
7d2005c
Compare
Member
Author
|
/test |
This was referenced Apr 8, 2025
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #38126 and #38157. Change all the remaining instances where modern Go constructs may be used.
Generated using
modernizeby running:and committing the relevant changes with some minor manual edits (e.g. reordering added imports).
The only change that was left out was replacing
omitemptybyomitzeroin structs since these might introduce API-breaking changes and need to be reviewed individually. This will be done in a separate follow-up PR together with enablingmodernizein CI.See individual commit messages for details.
Sorry for the huge PR touching many pieces of the code base and requiring many code reviewers 😢 Best reviewed by filtering for "Only files owned by you" so you only see changes for your own review groups: