MCPcopy Create free account
hub / github.com/pquerna/ffjson / NewBufferString

Function NewBufferString

fflib/v1/buffer.go:419–421  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

417// In most cases, new(Buffer) (or just declaring a Buffer variable) is
418// sufficient to initialize a Buffer.
419func NewBufferString(s string) *Buffer {
420 return &Buffer{buf: []byte(s)}
421}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…