Registry / utility / x-xerrors

x-xerrors

JSON →
library0.0.0-20240903120638-7835f813f4dagogounverified

Package xerrors implements functions to manipulate errors, providing error wrapping and formatting.

go get golang.org/x/xerrors
INSTALL
IMPORT
SIG · X-XERRORS
X
x-xerrors
utilitygov0.0.0-20240903120638-7835f813f4da
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.

xerrors
golang.org/x/xerrors

Create and wrap errors using xerrors

package main import ( "fmt" "golang.org/x/xerrors" ) func main() { err := xerrors.New("base error") wrapped := xerrors.Errorf("wrapped: %w", err) fmt.Println(xerrors.Is(wrapped, err)) }
Debug
Known issues
breakingxerrors is deprecated; use the standard library errors package (Go 1.13+)
fix
Replace with fmt.Errorf and errors.Is/As from the standard library
affects: >=0.0.0
Upgrade
Version history
0.0.0-20240903120638-7835f813f4dalatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
x-xerrors — go get x-xerrors · libregistry