(t testing.TB)
| 61 | } |
| 62 | |
| 63 | func NewTestLogWriter(t testing.TB) io.Writer { |
| 64 | w := &testLogWriter{t: t} |
| 65 | t.Cleanup(func() { |
| 66 | w.mu.Lock() |
| 67 | defer w.mu.Unlock() |
| 68 | w.testOver = true |
| 69 | }) |
| 70 | return w |
| 71 | } |
| 72 | |
| 73 | func (w *testLogWriter) Write(p []byte) (n int, err error) { |
| 74 | n = len(p) |