Buffer is a wrapper on top of bytes.Buffer, but with a RWMutex to protect concurrent calls.
| 9 | |
| 10 | // Buffer is a wrapper on top of bytes.Buffer, but with a RWMutex to protect concurrent calls. |
| 11 | type Buffer struct { |
| 12 | l sync.RWMutex |
| 13 | b bytes.Buffer |
| 14 | } |
| 15 | |
| 16 | func (rw *Buffer) Read(p []byte) (n int, err error) { |
| 17 | rw.l.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected