errors

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(left error, right error) error

func AppendInto

func AppendInto(into *error, err error) (errored bool)

func AppendInvoke

func AppendInvoke(into *error, invoker Invoker)

func Combine

func Combine(errors ...error) error

func ErrOnce

func ErrOnce(fn func() error) func() error

func Errors

func Errors(err error) []error

Types

type DeferStack

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

func NewDeferStack

func NewDeferStack() *DeferStack

func (*DeferStack) Call

func (ds *DeferStack) Call() (err error)

func (*DeferStack) Defer

func (ds *DeferStack) Defer(fn func())

func (*DeferStack) DeferErr

func (ds *DeferStack) DeferErr(fn func() error)

type Invoke

type Invoke func() error

func (Invoke) Invoke

func (i Invoke) Invoke() error

type Invoker

type Invoker interface {
	Invoke() error
}

func Close

func Close(closer io.Closer) Invoker

type TraceError

type TraceError struct {
	Err error
}

Jump to

Keyboard shortcuts

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