Go Errors context
Add context and stack information to errors in Go.
pkg · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a new Go module, add github.com/pkg/errors at v0.9.1. Wrap a fictional missing-item error and inspect the stored cause.
What we tested
v0.9.1. Wrap a fictional missing-item error and inspect the stored cause. Added the caller context and retained the original cause.