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

Method Write

go/fory/string.go:131–140  ·  view source on GitHub ↗
(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value)

Source from the content-addressed store, hash-verified

129}
130
131func (s stringSerializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) {
132 if refMode != RefModeNone {
133 // String is non-primitive, needs ref flag
134 ctx.buffer.WriteInt8(NotNullValueFlag)
135 }
136 if writeType {
137 ctx.buffer.WriteUint8(uint8(STRING))
138 }
139 s.WriteData(ctx, value)
140}
141
142func (s stringSerializer) ReadData(ctx *ReadContext, value reflect.Value) {
143 err := ctx.Err()

Callers

nothing calls this directly

Calls 4

WriteDataMethod · 0.95
WriteUint8Method · 0.80
uint8Function · 0.50
WriteInt8Method · 0.45

Tested by

no test coverage detected