Closed chrisdoherty4 closed 2 years ago
Additional context here: https://github.com/tinkerbell/hegel/pull/82#discussion_r852267922
Aww looks like I lost my comment here... I was initially against this change mostly because I took issue with the statement:
The errorf option forces developers to expose errors as part of their package APIs.
As I didn't see that to be necessarily true. But after going back and re-reading the relevant go blog post its explicitly called out that the use of %w
is so that code can parse the error. If code was not meant to parse the error then %v
should be used. I think that matches up with the statement and so am now on board with this.
@mmlb Are you able to merge this?
The errorf option forces developers to expose errors as part of their package APIs. This has the effect of forcing any use of a third party or other package's errors to become part of a package API.
- https://github.com/tinkerbell/hegel/pull/82#discussion_r852453070