(ctx *ReadContext, value reflect.Value)
| 470 | } |
| 471 | |
| 472 | func (s float64ArraySerializer) ReadData(ctx *ReadContext, value reflect.Value) { |
| 473 | buf := ctx.Buffer() |
| 474 | err := ctx.Err() |
| 475 | size := ctx.ReadBinaryLength() |
| 476 | length, ok := checkWireArraySize(ctx, size, 8, value) |
| 477 | if !ok { |
| 478 | return |
| 479 | } |
| 480 | if length > 0 { |
| 481 | if isLittleEndian { |
| 482 | ptr := value.Addr().UnsafePointer() |
| 483 | buf.Read(unsafe.Slice((*byte)(ptr), size)) |
| 484 | } else { |
| 485 | for i := 0; i < length; i++ { |
| 486 | value.Index(i).SetFloat(buf.ReadFloat64(err)) |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | func (s float64ArraySerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) { |
| 493 | done := readArrayRefAndType(ctx, refMode, readType, value) |
no test coverage detected