Description

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.

NewBufferString is referenced in 2833 repositories

github.com/golang/go github.com/lunny/tango github.com/fuxiaohei/tango

...