(c byte)
| 171 | } |
| 172 | |
| 173 | func (d *Decoder) float32(c byte) (float32, error) { |
| 174 | if c == msgpcode.Float { |
| 175 | n, err := d.uint32() |
| 176 | if err != nil { |
| 177 | return 0, err |
| 178 | } |
| 179 | return math.Float32frombits(n), nil |
| 180 | } |
| 181 | |
| 182 | n, err := d.int(c) |
| 183 | if err != nil { |
| 184 | return 0, fmt.Errorf("msgpack: invalid code=%x decoding float32", c) |
| 185 | } |
| 186 | return float32(n), nil |
| 187 | } |
| 188 | |
| 189 | // DecodeFloat64 decodes msgpack float32/64 into Go float64. |
| 190 | func (d *Decoder) DecodeFloat64() (float64, error) { |
no test coverage detected