chore: fix typos in httperror.go by tisonkun · Pull Request #2958 · labstack/echo · GitHub
Skip to content

chore: fix typos in httperror.go#2958

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

chore: fix typos in httperror.go#2958
aldas merged 2 commits into
labstack: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

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

aldas commented May 1, 2026

Copy link
Copy Markdown
Contributor

Other than that receiver change looks good.

@tisonkun

tisonkun commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Non-trivial change reverted.

@aldas aldas left a comment

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.

LGTM

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

@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