MCPcopy Create free account
hub / github.com/docker/cli / NewWriterWithHook

Function NewWriterWithHook

internal/test/writer.go:23–25  ·  view source on GitHub ↗

NewWriterWithHook returns a io.Writer that still writes to the actualWriter but also calls the hook function after every write. It is useful to use this function when you need to wait for a writer to complete writing inside a test.

(actualWriter io.Writer, hook func([]byte))

Source from the content-addressed store, hash-verified

21// after every write. It is useful to use this function when
22// you need to wait for a writer to complete writing inside a test.
23func NewWriterWithHook(actualWriter io.Writer, hook func([]byte)) *writerWithHook {
24 return &writerWithHook{actualWriter: actualWriter, hook: hook}
25}

Callers 1

TerminatePromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…