Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Aug 21:18
· 19 commits to main since this release
v0.4.0
385c3a2
  • Add ctxwrap subpackage for attaching context.Context to errors (see README for more on this)
  • Add wrap.ErrorWithAttrs function for attaching structured log attributes to errors
  • Add wrap.Errorsf function for wrapping multiple errors with a formatted message
  • Breaking: Change variadic parameter in wrap.Errors to slice of errors
    • This makes the signature of this function more consistent with the other multi-error-wrapping functions in this package
    • To migrate, replace:
      wrap.Errors("error message", err1, err2)
      ...with:
      wrap.Errors([]error{err1, err2}, "error message")
  • Make error unwrapping of plain errors more robust (check for Unwrap() error method instead of just splitting on ": ")