Len returns the number of bytes currently buffered.
()
| 38 | |
| 39 | // Len returns the number of bytes currently buffered. |
| 40 | func (b *Buffer) Len() int { |
| 41 | b.mu.Lock() |
| 42 | defer b.mu.Unlock() |
| 43 | return b.buf.Len() |
| 44 | } |
| 45 | |
| 46 | // Reset clears the buffer. |
| 47 | func (b *Buffer) Reset() { |