MCPcopy Index your code
hub / github.com/coder/coder / Context

Function Context

testutil/ctx.go:9–13  ·  view source on GitHub ↗
(t testing.TB, dur time.Duration)

Source from the content-addressed store, hash-verified

7)
8
9func Context(t testing.TB, dur time.Duration) context.Context {
10 ctx, cancel := context.WithTimeout(context.Background(), dur)
11 t.Cleanup(cancel)
12 return ctx
13}

Calls 1

CleanupMethod · 0.65