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

Method WriteData

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

Source from the content-addressed store, hash-verified

282}
283
284func (s timeSerializer) WriteData(ctx *WriteContext, value reflect.Value) {
285 seconds, nanos := GetUnixSecondsAndNanos(value.Interface().(time.Time))
286 ctx.buffer.WriteInt64(seconds)
287 ctx.buffer.WriteUint32(nanos)
288}
289
290func (s timeSerializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) {
291 if refMode != RefModeNone {

Callers 1

WriteMethod · 0.95

Calls 3

GetUnixSecondsAndNanosFunction · 0.85
WriteUint32Method · 0.80
WriteInt64Method · 0.45

Tested by

no test coverage detected