src.elv.shsrc.elv.sh/pkg/errutil Index | Files

package errutil

import "src.elv.sh/pkg/errutil"

Package errutil contains common error-related utilities.

Index

Functions

func Multi

func Multi(errs ...error) error

Multi combines multiple errors into one:

If the input contains any error returned by Multi, such errors are flattened. The following two calls return the same value:

Multi(Multi(err1, err2), Multi(err3, err4))
Multi(err1, err2, err3, err4)

Source Files

errutil.go multi_error.go

Version
v0.21.0 (latest)
Published
Aug 13, 2024
Platform
linux/amd64
Imports
1 packages
Last checked
1 day ago

Tools for package owners.