MCPcopy Create free account
hub / github.com/davecheney/pub / forEach

Function forEach

workers/processor.go:29–36  ·  view source on GitHub ↗
(a []T, fn func(T) error)

Source from the content-addressed store, hash-verified

27}
28
29func forEach[T any](a []T, fn func(T) error) error {
30 for _, v := range a {
31 if err := fn(v); err != nil {
32 return err
33 }
34 }
35 return nil
36}

Callers 1

processFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected