Float32 adds a float32 to be encoded, must be used inside a slice or array encoding (does not encode a key)
(v float32)
| 250 | |
| 251 | // Float32 adds a float32 to be encoded, must be used inside a slice or array encoding (does not encode a key) |
| 252 | func (enc *Encoder) Float32(v float32) { |
| 253 | r := enc.getPreviousRune() |
| 254 | if r != '[' { |
| 255 | enc.writeByte(',') |
| 256 | } |
| 257 | enc.buf = strconv.AppendFloat(enc.buf, float64(v), 'f', -1, 32) |
| 258 | } |
| 259 | |
| 260 | // Float32OmitEmpty adds an int to be encoded and skips it if its value is 0, |
| 261 | // must be used inside a slice or array encoding (does not encode a key). |
no test coverage detected