Reset resets the underlying byte slice. Subsequent writes re-use the slice's backing array.
()
| 102 | // Reset resets the underlying byte slice. Subsequent writes re-use the slice's |
| 103 | // backing array. |
| 104 | func (b *Buffer) Reset() { |
| 105 | b.bs = b.bs[:0] |
| 106 | } |
| 107 | |
| 108 | // Write implements io.Writer. |
| 109 | func (b *Buffer) Write(bs []byte) (int, error) { |
no outgoing calls