Write appends p to the buffer.
(p []byte)
| 16 | |
| 17 | // Write appends p to the buffer. |
| 18 | func (b *Buffer) Write(p []byte) (int, error) { |
| 19 | b.mu.Lock() |
| 20 | defer b.mu.Unlock() |
| 21 | return b.buf.Write(p) |
| 22 | } |
| 23 | |
| 24 | // String returns the buffered content. |
| 25 | func (b *Buffer) String() string { |