Bump to Go 1.25 and apply automated fixes (go fix)#355
Merged
Conversation
This is easier to read and can avoid a loop variable. Signed-off-by: Stephen Kitt <skitt@redhat.com>
This produces surprising results in tests: go-spew outputs "interface
{}", so the tests specify "any" but verify "interface {}".
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Member
Author
|
/cc @dims |
dc9b99c to
e285858
Compare
This is the version used by the oldest Kubernetes branch we still support (1.34). golangci-lint 2.4.0 is the oldest version supporting Go 1.25. This requires bumping golangci-lint-action and changing the command-line; gofmt is disabled because it's a formatter, not a linter (and golangci-lint now distinguishes between the two), and revive is disabled because it mandates more documentation. This should be addressed later. Building with Go 1.25 requires fixing a couple of non-constant format string stragglers. Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
skitt
commented
Jul 6, 2026
| {map[string]int{}, "(map[string]int) {\n}\n"}, | ||
| {map[string]int{"one": 1}, "(map[string]int) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"}, | ||
| {map[string]interface{}{"one": 1}, "(map[string]interface {}) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"}, | ||
| {map[string]any{"one": 1}, "(map[string]interface {}) (len=1) {\n (string) (len=3) \"one\": (int) 1\n}\n"}, |
Member
Author
There was a problem hiding this comment.
go-spew doesn’t know about any…
Member
|
/approve |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, skitt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This bumps to Go 1.25, which is the oldest version used by currently-supported
k/kbranches.It also applies all automated
go fixfixes; the commits before the 1.25 bump are valid for Go 1.23, those after it require Go 1.25. The main purpose of this is to set a baseline so thatgo fixcan be used in future PRs (for example withgo:inlinedirectives).Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: