String returns the buffered content.
()
| 23 | |
| 24 | // String returns the buffered content. |
| 25 | func (b *Buffer) String() string { |
| 26 | b.mu.Lock() |
| 27 | defer b.mu.Unlock() |
| 28 | return b.buf.String() |
| 29 | } |
| 30 | |
| 31 | // Bytes returns a copy of the buffered content as a byte slice. |
| 32 | // The returned slice is safe to retain and modify. |