errorx

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(fns ...func() error) error

Chain runs funs one by one until an error occurred.

Types

type AtomicError

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

AtomicError defines an atomic error.

func (*AtomicError) Load

func (ae *AtomicError) Load() error

Load returns the error.

func (*AtomicError) Set

func (ae *AtomicError) Set(err error)

Set sets the error.

type BatchError

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

A BatchError is an error that can hold multiple errors.

func (*BatchError) Add

func (be *BatchError) Add(err error)

Add adds err to be.

func (*BatchError) Err

func (be *BatchError) Err() error

Err returns an error that represents all errors.

func (*BatchError) NotNil

func (be *BatchError) NotNil() bool

NotNil checks if any error inside.

Jump to

Keyboard shortcuts

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