errutils

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 4 Imported by: 0

README

write readme for errutils package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiError

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

func NewMultiErr

func NewMultiErr(err error) (multiErr *MultiError)

NewMultiErr creates a new MultiError and adds the given error to it.

func (*MultiError) Add

func (m *MultiError) Add(err error)

Add adds an error to the MultiError. If the error is nil, it is not added.

func (*MultiError) Error

func (m *MultiError) Error() string

Error function implements the error.Error function of the error interface

func (*MultiError) GetAll

func (m *MultiError) GetAll() (errs []error)

GetAll returns all the errors in the MultiError.

func (*MultiError) HasError

func (m *MultiError) HasError(err error) bool

HasError will return true if the MultiError has any errors of the specified type

func (*MultiError) HasErrors added in v1.0.5

func (m *MultiError) HasErrors() bool

HasErrors will return true if the MultiError has any errors

Jump to

Keyboard shortcuts

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