MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / Wrap

Function Wrap

pkg/util/multierror/multierror.go:28–30  ·  view source on GitHub ↗

Wrap takes a slice of errors and returns a single error that encapsulates those underlying errors. If the slice is nil or empty it returns nil. If the slice only contains a single element, that error is returned directly. When more than one error is wrapped, the Error() string is a concatenation of

(errs ...error)

Source from the content-addressed store, hash-verified

26// When more than one error is wrapped, the Error() string is a concatenation
27// of the Error() values of all underlying errors.
28func Wrap(errs ...error) error {
29 return multiError(errs).flatten()
30}
31
32// WrapWithSeparator same as Wrap but uses a custom separator when joining
33// error messages.

Callers 15

ShutdownAllFunction · 0.92
CloseMethod · 0.92
KillFunction · 0.92
allowMethod · 0.92
denyMethod · 0.92
removeAllowRulesMethod · 0.92
parseCompilerErrorsFunction · 0.92
NewFunction · 0.92
ValidateMethod · 0.92
LoadMacrosMethod · 0.92
decodeFilterFunction · 0.92
parseCompilerErrorsFunction · 0.92

Calls 2

multiErrorTypeAlias · 0.85
flattenMethod · 0.80

Tested by

no test coverage detected