MCPcopy Create free account
hub / github.com/blues/note / newEncodeState

Function newEncodeState

jsonxt/encode.go:283–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281var encodeStatePool sync.Pool
282
283func newEncodeState() *encodeState {
284 if v := encodeStatePool.Get(); v != nil {
285 e := v.(*encodeState)
286 e.Reset()
287 return e
288 }
289 return new(encodeState)
290}
291
292// jsonError is an error wrapper type for internal use only.
293// Panics with errors are wrapped in jsonError so that the top-level recover

Callers 2

EncodeMethod · 0.85
MarshalFunction · 0.85

Calls 2

GetMethod · 0.80
ResetMethod · 0.80

Tested by

no test coverage detected