MCPcopy
hub / github.com/cortexlabs/cortex / WrapAll

Function WrapAll

pkg/lib/errors/multi.go:39–48  ·  view source on GitHub ↗
(errs []error, strs ...string)

Source from the content-addressed store, hash-verified

37}
38
39func WrapAll(errs []error, strs ...string) []error {
40 if !HasError(errs) {
41 return nil
42 }
43 wrappedErrs := make([]error, len(errs))
44 for i, err := range errs {
45 wrappedErrs[i] = Wrap(err, strs...)
46 }
47 return wrappedErrs
48}
49
50func HasError(errs []error) bool {
51 for _, err := range errs {

Callers 3

StructFunction · 0.92
StructFromStringMapFunction · 0.92
ParseYAMLFileFunction · 0.92

Calls 2

HasErrorFunction · 0.85
WrapFunction · 0.85

Tested by

no test coverage detected