Skip to content
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

all: change the signature of Each to be a range function #20

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

creachadair
Copy link
Owner

Most of the collections defined here already have an Each method that iterates
the contents of the collection and was almost compatible with the new range
function interface added in Go 1.23.

Here, we make it fully compatible, by discarding the Boolean return value from
the Each method itself. This bumps the required Go version from 1.22 to 1.23.
Technically we could avoid that by not updating the usage within the package
itself, but as far as I am aware all the consumers of this package are using Go
1.23 already.

Most of the collections defined here already have an Each method that iterates
the contents of the collection and was almost compatible with the new range
function interface added in Go 1.23.

Here, we make it fully compatible, by discarding the Boolean return value from
the Each method itself. This bumps the required Go version from 1.22 to 1.23.
Technically we could avoid that by not updating the usage within the package
itself, but as far as I am aware all the consumers of this package are using Go
1.23 already.
@creachadair creachadair merged commit 533a344 into main Sep 11, 2024
1 check passed
@creachadair creachadair deleted the mjf/iterate branch September 11, 2024 23:20
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.

2 participants