(ctx *WriteContext, value reflect.Value)
| 616 | var globalFloat16Serializer = float16Serializer{} |
| 617 | |
| 618 | func (s float16Serializer) WriteData(ctx *WriteContext, value reflect.Value) { |
| 619 | // Value is effectively uint16 (alias) |
| 620 | // We can use WriteUint16, but we check if it is indeed float16 compatible |
| 621 | // The value comes from reflection, likely an interface or concrete type |
| 622 | // Since Float16 is uint16, value.Uint() works. |
| 623 | ctx.buffer.WriteUint16(uint16(value.Uint())) |
| 624 | } |
| 625 | |
| 626 | func (s float16Serializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) { |
| 627 | if refMode != RefModeNone { |
no test coverage detected