MCPcopy
hub / github.com/moby/moby / Join

Function Join

daemon/internal/multierror/multierror.go:8–27  ·  view source on GitHub ↗

Join is a drop-in replacement for errors.Join with better formatting.

(errs ...error)

Source from the content-addressed store, hash-verified

6
7// Join is a drop-in replacement for errors.Join with better formatting.
8func Join(errs ...error) error {
9 n := 0
10 for _, err := range errs {
11 if err != nil {
12 n++
13 }
14 }
15 if n == 0 {
16 return nil
17 }
18 e := &joinError{
19 errs: make([]error, 0, n),
20 }
21 for _, err := range errs {
22 if err != nil {
23 e.errs = append(e.errs, err)
24 }
25 }
26 return e
27}
28
29type joinError struct {
30 errs []error

Callers 7

deduceContainerPlatformFunction · 0.92
validateEndpointSettingsFunction · 0.92
validateIpamConfigFunction · 0.92
SetParentMethod · 0.92
callFunction · 0.92
TestErrorJoinFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestErrorJoinFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…