multierror

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package multierror aggregates several errors into a single error whose message renders each underlying error as a bulleted list. It is backed entirely by the standard library and exists to give run and run --all the human-readable aggregation output that plain errors.Join does not provide.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(errs ...error) error

Join collects the non-nil errors into a single Error, flattening any nested aggregates (including errors produced by errors.Join and by Join itself) so that every error renders as a single top-level bullet. It returns nil when every given error is nil, mirroring errors.Join.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error aggregates multiple errors into one. Error.Error renders the underlying errors as a bulleted list, and Error.Unwrap exposes them so that errors.Is and errors.As continue to traverse the aggregated errors.

func (*Error) Error

func (e *Error) Error() string

Error renders the aggregated errors as a bulleted list.

func (*Error) Unwrap

func (e *Error) Unwrap() []error

Unwrap returns the aggregated errors so that errors.Is and errors.As can traverse them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL