errcollection

package
v0.0.0-...-b44688a Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCollection

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

ErrorCollection gives ability to return multiple errors instead of one. It gathers errors and return error with message combined with messages from all given errors delimited by defined string.

func (*ErrorCollection) Add

func (e *ErrorCollection) Add(err error)

Add inserts new error to collection.

func (*ErrorCollection) GetErrIfAny

func (e *ErrorCollection) GetErrIfAny() error

GetErrIfAny returns error with combined message from all given errors. In case of no error it returns nil.

Jump to

Keyboard shortcuts

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