Registry / utility / multierr

multierr

JSON →
library1.11.0gogounverified

Allows combining one or more errors together.

go get go.uber.org/multierr
INSTALL
IMPORT
SIG · MULTIERR
M
multierr
utilitygov1.11.0
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.

multierr
go.uber.org/multierr

Combines multiple errors into one.

package main import ( "errors" "fmt" "go.uber.org/multierr" ) func main() { err1 := errors.New("first error") err2 := errors.New("second error") combined := multierr.Combine(err1, err2) fmt.Println(combined) }
Debug
Known issues
gotchaAppendInto modifies the error variable in place; ensure it's used correctly in loops.
fix
Use AppendInto with a pointer to the error variable.
affects: >=1.0.0
Upgrade
Version history
1.11.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
multierr — go get multierr · libregistry