-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add iter.ForEach #53
Add iter.ForEach #53
Conversation
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.
Thanks for the contribution! It looks good and I have a few requests in line and here:
- Please move the implementation into
iter.go
- Please move the tests into
iter_test.go
A note on the file name you've chosen, in Go the convention is to use snake_case_test.go
.
I'll run the tests for you now in case I missed anything.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 19 19
Lines 376 382 +6
=========================================
+ Hits 376 382 +6
☔ View full report in Codecov by Sentry. |
@BooleanCat Have done the changes, I think find should also go in iter.go though. |
Good point and I agree. Feel free to submit a PR with this change otherwise I'll move it next time I'm near that code. |
@Rajan-226 Thanks for your contribution! |
Please provide a brief description of the change.
A sentence or two is fine, the rest should be clear from the code change and related issue.
It adds for each for iterator package, which can execute a callback on each item contained by an iterator.
Which issue does this change relate to?
Please provide a link to the issue that this change resolved.
#45
If there is no such issue, consider creating one first. Discussions concerning proposed changes ought to take place in an issue and not in pull requests. Pull requests not associated with an issue are less likely to be merged and more likely to ask for changes.
Contribution checklist.
Replace the space in each box with "X" to check it off.
make check
)make test
)Additional context
Add any other context about the problem here.