Skip to content

chore: fix typos in httperror.go#2958

Merged
aldas merged 2 commits intolabstack:masterfrom
tisonkun:fix-typos
May 1, 2026
Merged

chore: fix typos in httperror.go#2958
aldas merged 2 commits intolabstack:masterfrom
tisonkun:fix-typos

Conversation

@tisonkun
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: tison <wander4096@gmail.com>
Comment thread httperror.go Outdated
// 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 {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is intentional as this Wrap does not mutate the HTTPError instance returns "immutable-copy wrapping"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (he *HTTPError) Wrap(err error) error {
func (he HTTPError) Wrap(err error) error {

@tisonkun
Copy link
Copy Markdown
Contributor Author

@aldas

@aldas
Copy link
Copy Markdown
Contributor

aldas commented May 1, 2026

Other than that receiver change looks good.

@tisonkun
Copy link
Copy Markdown
Contributor Author

tisonkun commented May 1, 2026

Non-trivial change reverted.

Copy link
Copy Markdown
Contributor

@aldas aldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.08%. Comparing base (22e4b71) to head (b12f646).
⚠️ Report is 9 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aldas aldas merged commit 96be504 into labstack:master May 1, 2026
10 checks passed
@tisonkun tisonkun deleted the fix-typos branch May 1, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants