MCPcopy Index your code
hub / github.com/cortexproject/cortex / Error

Method Error

pkg/util/multierror/multierror.go:44–59  ·  view source on GitHub ↗

Error returns a concatenated string of the contained errors.

()

Source from the content-addressed store, hash-verified

42
43// Error returns a concatenated string of the contained errors.
44func (es nonNilMultiError) Error() string {
45 var buf bytes.Buffer
46
47 if len(es) > 1 {
48 fmt.Fprintf(&buf, "%d errors: ", len(es))
49 }
50
51 for i, err := range es {
52 if i != 0 {
53 buf.WriteString("; ")
54 }
55 buf.WriteString(err.Error())
56 }
57
58 return buf.String()
59}

Callers 3

TestDependenciesFunction · 0.45
TestMultiError_ErrFunction · 0.45

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.65

Tested by 3

TestDependenciesFunction · 0.36
TestMultiError_ErrFunction · 0.36