Reset clears the buffer.
()
| 45 | |
| 46 | // Reset clears the buffer. |
| 47 | func (b *Buffer) Reset() { |
| 48 | b.mu.Lock() |
| 49 | defer b.mu.Unlock() |
| 50 | b.buf.Reset() |
| 51 | } |
| 52 | |
| 53 | // Drain returns the buffered content and resets the buffer atomically. |
| 54 | func (b *Buffer) Drain() string { |