NewBuffer creates and initializes a new Buffer using buf as its initial contents. It is intended to prepare a Buffer to read existing data. It can also be used to size the internal buffer for writing. To do that, buf should have the desired capacity but a length of zero. In most cases, new(Buffer
(buf []byte)
| 409 | // In most cases, new(Buffer) (or just declaring a Buffer variable) is |
| 410 | // sufficient to initialize a Buffer. |
| 411 | func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} } |
| 412 | |
| 413 | // NewBufferString creates and initializes a new Buffer using string s as its |
| 414 | // initial contents. It is intended to prepare a buffer to read an existing |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…