Bytes returns a copy of the accumulated output.
()
| 104 | |
| 105 | // Bytes returns a copy of the accumulated output. |
| 106 | func (wb *WaitBuffer) Bytes() []byte { |
| 107 | wb.mu.Lock() |
| 108 | defer wb.mu.Unlock() |
| 109 | return bytes.Clone(wb.buf.Bytes()) |
| 110 | } |
| 111 | |
| 112 | // String returns the accumulated output as a string. |
| 113 | func (wb *WaitBuffer) String() string { |