refactor: apply go fix modernizers from Go 1.26#3463
Conversation
|
We should do this with go1.25, right? We support go1.25 and go1.26 |
sukunrt
left a comment
There was a problem hiding this comment.
We should do this with go1.25, right? We support go1.25 and go1.26
^ This is not a problem. go fix considers go.mod version.
This PR applies automated refactoring from go 1.26 (go fix ./...):
- interface{} to any, slices.Contains, range loops and other idiomatic updates.
These changes are not necessary, but may be nice to have for improved code readability.
e8ef796 to
237978f
Compare
|
check failing because the CI is using an older version? |
Assuming so. I guess #3462 did not run CI tests? |
|
@galargh, could ipdx update the patch version of Go 1.25 it uses? Otherwise I think we have to fork that workflow :/ |
46bcc1a to
2338349
Compare
|
ty @gammazero |
FYI, it was https://github.com/actions/setup-go resolving 1.25.x (from https://github.com/libp2p/go-libp2p/blob/master/.github/workflows/go-check.yml#L20) to 1.25.6. If that input was skipped 1.25.7 would have been passed to setup-go action instead. |
|
By skipped you mean if it the |
|
Yeap, it should use the version from https://github.com/libp2p/go-libp2p/blob/master/go.mod#L3 by default |
This PR applies automated refactoring from go 1.26 (go fix ./...):
These changes are not necessary, but may be nice to have for improved code readability.