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

feat: add support for iterators introduced in go1.23 #41

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

TristanSpeakEasy
Copy link
Contributor

This PR adds support for the new iter package in go1.23 allowing a for range loop to be used with the ordered maps improving devex

Copy link
Owner

@wk8 wk8 left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

Suggested renaming a couple funcs, would be great to mention that in the README as well?

Ideally we'd want iterators from newest pairs too?

orderedmap.go Outdated Show resolved Hide resolved
orderedmap.go Outdated Show resolved Hide resolved
orderedmap.go Outdated Show resolved Hide resolved
@TristanSpeakEasy
Copy link
Contributor Author

Thanks @wk8 I chose to match the naming of the map.All, map.Keys and map.Values function in the stdlib as it would help with discovery but let me know if you would like me to definitely changes these to the suggested names.

I can also update the readme

@TristanSpeakEasy
Copy link
Contributor Author

Ideally we'd want iterators from newest pairs too?

Actually in light of this I changes all the names and added the new methods

@TristanSpeakEasy
Copy link
Contributor Author

okay have address the feedback plus added a utility From method for making copies easily using the iterators

@TristanSpeakEasy
Copy link
Contributor Author

@wk8 anything else you would like changed? Otherwise can we have this merged please would be great to get a few of our dependencies updated

@chase-crumbaugh
Copy link

I've been wanting this feature for a while now. Thanks for putting the PR together. Happy to help as needed to get this merged

Copy link
Owner

@wk8 wk8 left a comment

Choose a reason for hiding this comment

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

Thanks a lot! :)

@wk8 wk8 merged commit 6ea3647 into wk8:master Aug 15, 2024
@TristanSpeakEasy TristanSpeakEasy deleted the iterators branch August 15, 2024 15:39
@TristanSpeakEasy TristanSpeakEasy restored the iterators branch August 15, 2024 15:40
@amir20
Copy link

amir20 commented Sep 2, 2024

Just realized this hasn't been released yet. 🫠 Any plans to release?

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