MCPcopy Create free account
hub / github.com/coder/coder / NewFakeSink

Function NewFakeSink

testutil/fake_sink.go:22–30  ·  view source on GitHub ↗

NewFakeSink returns a FakeSink ready for use.

(t testing.TB)

Source from the content-addressed store, hash-verified

20
21// NewFakeSink returns a FakeSink ready for use.
22func NewFakeSink(t testing.TB) *FakeSink {
23 fs := &FakeSink{t: t}
24 t.Cleanup(func() {
25 fs.mu.Lock()
26 fs.tDone = true
27 fs.mu.Unlock()
28 })
29 return fs
30}
31
32// LogEntry implements slog.Sink. It appends the entry to the
33// internal slice.

Calls 3

CleanupMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45