-
Notifications
You must be signed in to change notification settings - Fork 30
Update to Go 1.24 #321
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 #321
Conversation
|
With the current github action we use it should be trivial to add a macos and windows lint job as well, given there is a fair amount of platform specific code that might make sense to do. |
image/docker/reference/normalize.go
Outdated
| if top, rest, ok := strings.Cut(repo.path, "/"); ok && top == officialRepoName { | ||
| repo.path = rest |
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.
this is not the same and I guess that is what the tests are failing
strings.Cut() is equal to strings.SplitN(repo.path, "/",2), in the new case you match the with one or more / wile do old one was exact one /
common/pkg/cgroups/blkio_linux.go
Outdated
| minorStr, majorStr, ok := strings.Cut(k, ":") | ||
| if !ok { |
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 assume this works the same as the file format only describes minor:major but technically this is not the same.
Previously if is a second : we just continue, now it will be part of majorStr and thus fail in ParseUint
common/pkg/cgroups/blkio_linux.go
Outdated
| op, valueStr, ok := strings.Cut(item, "=") | ||
| if !ok { |
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.
same thing here
|
Non blocking but podman CI is not yet ready for 1.24 containers/podman#27017 (comment) but that should be solved soon so we can definitely merge this here. |
|
@Luap99 Thanks, updated (along with a few more reverts of overzealous |
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
@containers/container-libs-maintainers PTAL
Unrelated, just to make my work easier. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Don't create single strings only to split them again; avoid over-abstracted arrays that nevertheless assume a specific structure. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Passing nil as the unmarshaling destination is completely invalid, so, don't. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
The storage/drivers/aufs/aufs_test.go use is unmodified because it loops over b.N inside another loop. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
CreateCertificate does that automatically now. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
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
> go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./... and manually filter out "for var := range $number" which I aesthetically dislike. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Don't append into a long-lived slice. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
… and benefit from the new features.
Also a set somewhat-related cleanups; see individual commit messages for details.
Warning: absolutely untested in practice.