errutil

package
v0.0.0-...-a14268e Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMockedError

func IsMockedError(err error) bool

func WrapWithErrRoundtripper

func WrapWithErrRoundtripper(rt http.RoundTripper) http.RoundTripper

Types

type ErrorRoundTripper

type ErrorRoundTripper struct {
	Err error
}

ErrorRoundTripper is a custom RoundTripper that always returns an error.

func (*ErrorRoundTripper) RoundTrip

func (ert *ErrorRoundTripper) RoundTrip(*http.Request) (*http.Response, error)

type MultiError

type MultiError []error

The MultiError type implements the error interface, and contains the Errors used to construct it.

func (*MultiError) Add

func (es *MultiError) Add(err error)

Add adds the error to the error list if it is not nil.

func (MultiError) Err

func (es MultiError) Err() error

Err returns the error list as an error or nil if it is empty.

type NonNilMultiError

type NonNilMultiError MultiError

func (NonNilMultiError) Error

func (es NonNilMultiError) Error() string

Returns a concatenated string of the contained errors.

Jump to

Keyboard shortcuts

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