Registry / utility / pkg-errors

pkg-errors

JSON →
library0.9.1gogounverified

Package errors provides simple error handling primitives.

go get github.com/pkg/errors
INSTALL
IMPORT
SIG · PKG-ERRORS
P
pkg-errors
utilitygov0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

errors
github.com/pkg/errors

Create and wrap errors with stack traces

package main import "github.com/pkg/errors" func main() { err := errors.New("something went wrong") err = errors.Wrap(err, "additional context") errors.Cause(err) }
Debug
Known issues
breakingDeprecated in favor of Go 1.13+ errors.Is/As/Wrap
fix
Use standard library errors package with fmt.Errorf("%w", err)
affects: >=1.13
Upgrade
Version history
0.9.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pkg-errors — go get pkg-errors · libregistry