NewBufferString creates and initializes a new Buffer using string s as its initial contents. It is intended to prepare a buffer to read an existing string. In most cases, new(Buffer) (or just declaring a Buffer variable) is sufficient to initialize a Buffer.
(s string)
| 417 | // In most cases, new(Buffer) (or just declaring a Buffer variable) is |
| 418 | // sufficient to initialize a Buffer. |
| 419 | func NewBufferString(s string) *Buffer { |
| 420 | return &Buffer{buf: []byte(s)} |
| 421 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…