MCPcopy
hub / github.com/pquerna/ffjson / WriteByte

Method WriteByte

fflib/v1/buffer.go:265–269  ·  view source on GitHub ↗

WriteByte appends the byte c to the buffer, growing the buffer as needed. The returned error is always nil, but is included to match bufio.Writer's WriteByte. If the buffer becomes too large, WriteByte will panic with ErrTooLarge.

(c byte)

Source from the content-addressed store, hash-verified

263// WriteByte. If the buffer becomes too large, WriteByte will panic with
264// ErrTooLarge.
265func (b *Buffer) WriteByte(c byte) error {
266 m := b.grow(1)
267 b.buf[m] = c
268 return nil
269}
270
271func (b *Buffer) Rewind(n int) error {
272 b.buf = b.buf[:len(b.buf)-n]

Callers 10

WriteRuneMethod · 0.95
WriteJsonFunction · 0.80
fmtEFunction · 0.80
fmtFFunction · 0.80
fmtBFunction · 0.80
handleEscapedMethod · 0.80
ScanMethod · 0.80
scanFieldMethod · 0.80
FormatBits2Function · 0.80
MarshalJSONBufMethod · 0.80

Calls 1

growMethod · 0.95

Tested by

no test coverage detected