errorlist

package
v6.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: PostgreSQL Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

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

func New

func New(message string) *List

func (*List) Append

func (list *List) Append(err error) bool

Append a single error to the list

use Append to continue after an error up to a number of continuable errors.

Return false when list is full. Panics if error wraps multiple errors. Use Extend() to append joined errors.

func (List) Error

func (list List) Error() string

func (*List) Extend

func (list *List) Extend(err error) error

Extend list with wrapped errors.

Use Extend to aggregate skippable joined errors or fail fast on single error.

Return nil if list has free slots. Return err as is if it's a single error. Return self if list is full.

func (List) Len

func (list List) Len() int

func (List) Unwrap

func (list List) Unwrap() []error

Jump to

Keyboard shortcuts

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