MCPcopy Create free account
hub / github.com/go-json-experiment/json / TestEncoderReset

Function TestEncoderReset

jsontext/encode_test.go:743–829  ·  view source on GitHub ↗

TestEncoderReset tests that the encoder preserves its internal buffer between Reset calls to avoid frequent allocations when reusing the encoder. It ensures that the buffer capacity is maintained while avoiding aliasing issues with [bytes.Buffer].

(t *testing.T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

WriteValueMethod · 0.95
AvailableBufferMethod · 0.95
ResetMethod · 0.95
NewEncoderFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…