Skip to content

[question] Is there a way to get msg from errors.Wrap(code, msg)? #164

Description

@allencloud

Hi, I have a question for the project.

Now there is a line of code :

func A() error{
     return errors.Wrap(code, msg)
}

Then I have a caller err := A(), so can I use the returned err to get msg?

Thanks in advance.

Activity

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