-
Notifications
You must be signed in to change notification settings - Fork 852
Update to Go 1.24 #6380
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
Update to Go 1.24 #6380
Conversation
Update the version of Go we suggest in go.mod to 1.24, and update the one we use for the vendoring CI test to match. Signed-off-by: Nalin Dahyabhai <[email protected]>
Use the CutPrefix(), SplitSeq(), and FieldsSeq() functions from the strings package when chopping up or iterating over parts of strings, per golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize Signed-off-by: Nalin Dahyabhai <[email protected]>
Use maps.Copy() instead of iterating over a map's keys and values to copy the keys and values to a new map. Overdue from golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize Signed-off-by: Nalin Dahyabhai <[email protected]>
Drop the "omitempty" tag from the "json" tag on struct members that are themselves structs, since the JSON encoder doesn't actually do that, per golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize Signed-off-by: Nalin Dahyabhai <[email protected]>
Yes, this helper function always returns nil as one of its results, but that lets the callers not have to remember to do that, so it's shorter than changing the call sites. Signed-off-by: Nalin Dahyabhai <[email protected]>
Signed-off-by: Nalin Dahyabhai <[email protected]>
When checking that certain directories are masked, treat the readable-but-empty case as acceptable, as before, and now also accept actually-unreadable case, which can happen with crun 1.24. Signed-off-by: Nalin Dahyabhai <[email protected]>
| run_buildah run $cid ls $mask | ||
| expect_output "" "Directories should be empty" | ||
| run_buildah run $cid sh -c "echo $mask/*" # globbing will fail whether it's simply unreadable, or readable but empty | ||
| expect_output "$mask/*" "Directories should be empty" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this spaces-and-tabs mess if this PR needs to be revised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, nalind The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@flouthoc PTAL |
|
LGTM |
|
/lgtm |
What type of PR is this?
/kind other
What this PR does / why we need it:
Update to require Go 1.24, at minimum, now that Go 1.25 is out and 1.23 is no longer supported. Run the "modernize" tool to adopt some newer APIs.
How to verify it
The usual battery of tests.
Which issue(s) this PR fixes:
This should unblock a number of dependency update PRs.
Special notes for your reviewer:
Does this PR introduce a user-facing change?