Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Support Go 1.13 error chains in Cause #215

Merged
merged 1 commit into from Jan 7, 2020
Merged

Commits on Jan 6, 2020

  1. Support Go 1.13 error chains in Cause

    Imagine module A imports module B and both use `pkg/errors`. A uses
    `errors.Cause` to inspect wrapped errors returned from B. As-is, B
    cannot migrate from `errors.Wrap` to `fmt.Errorf("%w", err)` because
    that would break `errors.Cause` calls in A. With this change merged,
    `errors.Cause` becomes forwards-compatible with Go 1.13 error chains.
    Module B will be free to switch to `fmt.Errorf("%w", err)` and that will
    not break module A (so long as the top-level project pulls in the newer
    version of `pkg/errors`).
    jayschwa committed Jan 6, 2020
    Copy the full SHA
    c4261b0 View commit details
    Browse the repository at this point in the history