MCPcopy
hub / github.com/containerd/containerd / Do

Function Do

internal/cleanup/context.go:27–31  ·  view source on GitHub ↗

Do runs the provided function with a context in which the errors are cleared out and will timeout after 10 seconds.

(ctx context.Context, do func(context.Context))

Source from the content-addressed store, hash-verified

25// Do runs the provided function with a context in which the
26// errors are cleared out and will timeout after 10 seconds.
27func Do(ctx context.Context, do func(context.Context)) {
28 ctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 10*time.Second)
29 do(ctx)
30 cancel()
31}

Callers 3

unpackMethod · 0.92
CreateDiffFunction · 0.92
TestDoFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDoFunction · 0.68