镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

How to change format return wrapped error message #226

Open

Description

@putrafajarh

func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }

how can i change format return error message, to this

func (w *withMessage) Error() string { return w.cause.Error()+ " | " + w.msg }

Activity

  1. puellanivis commented on Mar 22, 2020

    @puellanivis

    There is no functionality for this provided. You would have to fork the repo.

  2. SkippyZA commented on Mar 26, 2020

    @SkippyZA

    You could also create a decorator for this and implement it in your own code without needing to manage a fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions