MCPcopy Create free account
hub / github.com/apache/fory / NewWriteContext

Function NewWriteContext

go/fory/writer.go:53–60  ·  view source on GitHub ↗

NewWriteContext creates a new write context

(trackRef bool, maxDepth int)

Source from the content-addressed store, hash-verified

51
52// NewWriteContext creates a new write context
53func NewWriteContext(trackRef bool, maxDepth int) *WriteContext {
54 return &WriteContext{
55 buffer: NewByteBuffer(nil),
56 refWriter: NewRefWriter(trackRef),
57 trackRef: trackRef,
58 maxDepth: maxDepth,
59 }
60}
61
62// Reset clears state for reuse (called before each Serialize)
63func (c *WriteContext) Reset() {

Callers 1

NewFunction · 0.85

Calls 2

NewByteBufferFunction · 0.85
NewRefWriterFunction · 0.85

Tested by

no test coverage detected