-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds an AppendInto function that behaves similarly to Append except, it operates on a `*error` on the left side and it reports whether the right side error was non-nil. func AppendInto(*error, error) (errored bool) Making the left side a pointer aligns with the fast path of `Append`. Returning whether the right error was non-nil aligns with the standard `if err := ...; err != nil` pattern. ```diff -if err := thing(); err != nil { +if multierr.AppendInto(&err, thing()) { continue } ``` Resolves #21
- Loading branch information
Showing
4 changed files
with
152 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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