ToByteSlice appends all bytes to the provided slice and returns it.
()
| 104 | |
| 105 | // ToByteSlice appends all bytes to the provided slice and returns it. |
| 106 | func (b *WriteBuffer) ToByteSlice() []byte { |
| 107 | b.mu.Lock() |
| 108 | defer b.mu.Unlock() |
| 109 | |
| 110 | return b.inner.ToByteSlice() |
| 111 | } |
| 112 | |
| 113 | // Bytes returns inner gather.Bytes. |
| 114 | func (b *WriteBuffer) Bytes() Bytes { |