multierror

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 2 Imported by: 1

README

multierror

Go Reference Go Report Card

a simple package for handling horizontal errors as opposed to veritical (fmt.Errorf %w error wrapping)

Documentation

Overview

Package multierror contains a Multierror for combining multiple errors and compiling with errors.Is

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(oldErr error, newErr error) error

Append new and old error together as a Multierror, reusing a multierror if it already exists. If either error is nil, the other error is returned.

Types

type Errors

type Errors []error

Errors is a collection of errors combined and treated as one.

func (Errors) Error

func (me Errors) Error() string

Error returns combined error.Error output by \n

func (Errors) Is

func (me Errors) Is(target error) bool

Is a target error, complies with errors.Is

func (Errors) Unwrap

func (me Errors) Unwrap() error

Unwrap MultiError for conforming to errors.Unwrap

Jump to

Keyboard shortcuts

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