Add a shorthand for AppendInvoke#65
Merged
sywhang merged 3 commits intouber-go:masterfrom Sep 6, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #65 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 108 109 +1
=========================================
+ Hits 108 109 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
sywhang
reviewed
Sep 1, 2022
Contributor
sywhang
left a comment
There was a problem hiding this comment.
Thank you for the contribution! This seems like a valid API to add to multierr. I left a couple of suggestions re: the doc. Can you please also add some test cases that covers this?
23d7f37 to
a2bdee3
Compare
Contributor
Author
|
Applied suggestion docs changes. Added a test for the function. Let me know if you see other things to improve. |
Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com> Apply code review suggestions Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com> Adding tests
a2bdee3 to
e06fb97
Compare
sywhang
approved these changes
Sep 5, 2022
Contributor
sywhang
left a comment
There was a problem hiding this comment.
Thanks for making the changes. LGTM.
Contributor
|
@abhinav do you know why the build is stuck here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I really like the idea of catching returned errors from deferred functions. Though having to use
multierrpackage name twice in the same line makes it a bit verbose in many occasions.This PR introduces a shorthand for AppendInvoke which allows passing function or method value directly without wrapping it into an Invoker.
So this:
could become this: