MCPcopy Create free account
hub / github.com/golang/appengine / Error

Method Error

errors.go:27–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25type MultiError []error
26
27func (m MultiError) Error() string {
28 s, n := "", 0
29 for _, e := range m {
30 if e != nil {
31 if n == 0 {
32 s = e.Error()
33 }
34 n++
35 }
36 }
37 switch n {
38 case 0:
39 return "(0 errors)"
40 case 1:
41 return s
42 case 2:
43 return s + " (and 1 other error)"
44 }
45 return fmt.Sprintf("%s (and %d other errors)", s, n-1)
46}

Callers 10

handleFunction · 0.45
TestGetRequestFunction · 0.45
TestAddRequestFunction · 0.45
TestSetRequestFunction · 0.45
TestNamespaceResettingFunction · 0.45
TestGetMultiEmptyFunction · 0.45
TestPeekRequestFunction · 0.45
exprFunction · 0.45
tdiffFunction · 0.45
gofmtFunction · 0.45

Calls

no outgoing calls

Tested by 7

TestGetRequestFunction · 0.36
TestAddRequestFunction · 0.36
TestSetRequestFunction · 0.36
TestNamespaceResettingFunction · 0.36
TestGetMultiEmptyFunction · 0.36
TestPeekRequestFunction · 0.36
tdiffFunction · 0.36