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

Method Reset

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

Reset resets the buffer so it has no content. b.Reset() is the same as b.Truncate(0).

()

Source from the content-addressed store, hash-verified

119// Reset resets the buffer so it has no content.
120// b.Reset() is the same as b.Truncate(0).
121func (b *Buffer) Reset() { b.Truncate(0) }
122
123// grow grows the buffer to guarantee space for n more bytes.
124// It returns the index where bytes should be written.

Callers 2

TestWriteJsonStringFunction · 0.95
TestMarshalEncoderFunction · 0.95

Calls 1

TruncateMethod · 0.95

Tested by 2

TestWriteJsonStringFunction · 0.76
TestMarshalEncoderFunction · 0.76