Skip to content

refactor: apply go fix modernizers from Go 1.26#3463

Merged
gammazero merged 5 commits intomasterfrom
modernize-code
Feb 26, 2026
Merged

refactor: apply go fix modernizers from Go 1.26#3463
gammazero merged 5 commits intomasterfrom
modernize-code

Conversation

@gammazero
Copy link
Contributor

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.

@gammazero gammazero marked this pull request as draft February 13, 2026 06:38
@gammazero gammazero marked this pull request as ready for review February 13, 2026 08:02
@sukunrt
Copy link
Member

sukunrt commented Feb 16, 2026

We should do this with go1.25, right? We support go1.25 and go1.26

Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@MarcoPolo
Copy link
Collaborator

check failing because the CI is using an older version?

@gammazero
Copy link
Contributor Author

check failing because the CI is using an older version?

Assuming so. I guess #3462 did not run CI tests?

@MarcoPolo
Copy link
Collaborator

@galargh, could ipdx update the patch version of Go 1.25 it uses? Otherwise I think we have to fork that workflow :/

@sukunrt sukunrt force-pushed the modernize-code branch 2 times, most recently from 46bcc1a to 2338349 Compare February 25, 2026 11:30
@gammazero gammazero merged commit e16f35e into master Feb 26, 2026
8 of 9 checks passed
@gammazero gammazero deleted the modernize-code branch February 26, 2026 22:40
@MarcoPolo
Copy link
Collaborator

ty @gammazero

@galargh
Copy link
Member

galargh commented Mar 1, 2026

@galargh, could ipdx update the patch version of Go 1.25 it uses? Otherwise I think we have to fork that workflow :/

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.

@MarcoPolo
Copy link
Collaborator

By skipped you mean if it the go-version: "1.25.x" line was removed? Would ipdxco/unified-github-workflows/.github/workflows/go-check.yml use 1.25 in that case and not 1.26?

@galargh
Copy link
Member

galargh commented Mar 5, 2026

Yeap, it should use the version from https://github.com/libp2p/go-libp2p/blob/master/go.mod#L3 by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants