Buffer provides a thread-safe buffer useful for logging to memory in unit tests.
| 124 | |
| 125 | // Buffer provides a thread-safe buffer useful for logging to memory in unit tests. |
| 126 | type Buffer struct { |
| 127 | buf bytes.Buffer |
| 128 | mux sync.Mutex |
| 129 | } |
| 130 | |
| 131 | func (b *Buffer) Read(p []byte) (n int, err error) { |
| 132 | b.mux.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected