Skip to content

Errorf should be able to wrap errors #244

@osamaadam

Description

@osamaadam

I expected Errorf to mimic fmt.Errorf's behavior of wrapping errors. Alas, that was not the case.
I was wondering if this is intentional or not. If it's intentional, then is there a way of formatting wrapping errors as '(wrapped error): outer error'?

Here's a playground link explaining what I'm talking about.
https://play.golang.org/p/yDjjs_8GsSY

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions