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

Method Write

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

Source from the content-addressed store, hash-verified

126type dateSerializer struct{}
127
128func (s dateSerializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) {
129 if refMode != RefModeNone {
130 ctx.buffer.WriteInt8(NotNullValueFlag)
131 }
132 if writeType {
133 ctx.buffer.WriteUint8(uint8(DATE))
134 }
135 s.WriteData(ctx, value)
136}
137
138func (s dateSerializer) WriteData(ctx *WriteContext, value reflect.Value) {
139 date := value.Interface().(Date)

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