ByteBuffer provides byte buffer, which can be used for minimizing memory allocations. ByteBuffer may be used with functions appending data to the given []byte slice. See example code for details. Use Get for obtaining an empty byte buffer.
| 10 | // |
| 11 | // Use Get for obtaining an empty byte buffer. |
| 12 | type ByteBuffer struct { |
| 13 | |
| 14 | // B is a byte buffer to use in append-like workloads. |
| 15 | // See example code for details. |
| 16 | B []byte |
| 17 | } |
| 18 | |
| 19 | // Len returns the size of the byte buffer. |
| 20 | func (b *ByteBuffer) Len() int { |
nothing calls this directly
no outgoing calls
no test coverage detected