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

Method WriteData

go/fory/time.go:233–237  ·  view source on GitHub ↗
(ctx *WriteContext, value reflect.Value)

Source from the content-addressed store, hash-verified

231}
232
233func (s durationSerializer) WriteData(ctx *WriteContext, value reflect.Value) {
234 seconds, nanos := durationWireParts(value.Interface().(time.Duration))
235 ctx.buffer.WriteVarint64(seconds)
236 ctx.buffer.WriteInt32(nanos)
237}
238
239func (s durationSerializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) {
240 if refMode != RefModeNone {

Callers 1

WriteMethod · 0.95

Calls 3

durationWirePartsFunction · 0.85
WriteVarint64Method · 0.45
WriteInt32Method · 0.45

Tested by

no test coverage detected