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))
| 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. |
| 23 | func NewWriterWithHook(actualWriter io.Writer, hook func([]byte)) *writerWithHook { |
| 24 | return &writerWithHook{actualWriter: actualWriter, hook: hook} |
| 25 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…