chore: fix typos in httperror.go#2958
Conversation
Signed-off-by: tison <wander4096@gmail.com>
| // Wrap eturns new HTTPError with given errors wrapped inside | ||
| func (he HTTPError) Wrap(err error) error { | ||
| // Wrap returns a new HTTPError with given errors wrapped inside | ||
| func (he *HTTPError) Wrap(err error) error { |
There was a problem hiding this comment.
This is a non-trivial change but it keeps all receivers as pointer receivers. Or else my linter would report:
Struct HTTPError has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.
There was a problem hiding this comment.
Well, it is intentional as this Wrap does not mutate the HTTPError instance returns "immutable-copy wrapping"
There was a problem hiding this comment.
| func (he *HTTPError) Wrap(err error) error { | |
| func (he HTTPError) Wrap(err error) error { |
|
Other than that receiver change looks good. |
|
Non-trivial change reverted. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2958 +/- ##
=======================================
Coverage 93.07% 93.08%
=======================================
Files 43 43
Lines 4506 4510 +4
=======================================
+ Hits 4194 4198 +4
Misses 195 195
Partials 117 117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.