tree: 5d7aaf9be3e1a6d80fb708a60fd2832cde0a3358 [path history] [tgz]
  1. .github/
  2. tools/
  3. .codecov.yml
  4. .gitignore
  5. appendinvoke_example_test.go
  6. benchmarks_test.go
  7. CHANGELOG.md
  8. error.go
  9. error_ext_test.go
  10. error_post_go120.go
  11. error_post_go120_test.go
  12. error_pre_go120.go
  13. error_test.go
  14. example_test.go
  15. go.mod
  16. go.sum
  17. LICENSE.txt
  18. Makefile
  19. README.md
README.md

multierr GoDoc Build Status Coverage Status

multierr allows combining one or more Go errors together.

Features

  • Idiomatic: multierr follows best practices in Go, and keeps your code idiomatic.
    • It keeps the underlying error type hidden, allowing you to deal in error values exclusively.
    • It provides APIs to safely append into an error from a defer statement.
  • Performant: multierr is optimized for performance:
    • It avoids allocations where possible.
    • It utilizes slice resizing semantics to optimize common cases like appending into the same error object from a loop.
  • Interoperable: multierr interoperates with the Go standard library's error APIs seamlessly:
    • The errors.Is and errors.As functions just work.
  • Lightweight: multierr comes with virtually no dependencies.

Installation

go get -u go.uber.org/multierr@latest

Status

Stable: No breaking changes will be made before 2.0.


Released under the MIT License.