erriter

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package erriter provides a way to iterate over errors tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All added in v0.9.0

func All(err error) iter.Seq[error]

Iter returns an iterator that iterates over an error tree recursively.

func Iter

func Iter(err error, f func(err error))

Iter iterates over an error tree recursively, and calls f for each non-nil error.

func Unwrap added in v0.4.2

func Unwrap(err error) ([]error, error)

Unwrap unwraps an error.

If the error implements `Unwrap() error`, it returns the unwrapped error. If the error implements `Unwrap() []error`, it returns the unwrapped errors. Otherwise, it returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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