(data []byte)
| 939 | } |
| 940 | |
| 941 | func decodeFloat4(data []byte) (float32, error) { |
| 942 | if len(data) < 4 { |
| 943 | return 0, fmt.Errorf("insufficient data for float4: got %d bytes, need 4", len(data)) |
| 944 | } |
| 945 | bits := binary.BigEndian.Uint32(data) |
| 946 | return math.Float32frombits(bits), nil |
| 947 | } |
| 948 | |
| 949 | func decodeFloat8(data []byte) (float64, error) { |
| 950 | if len(data) < 8 { |
no outgoing calls