MCPcopy Create free account
hub / github.com/francoispqt/gojay / encodeFloat32

Method encodeFloat32

encode_number_float.go:37–40  ·  view source on GitHub ↗
(n float32)

Source from the content-addressed store, hash-verified

35}
36
37func (enc *Encoder) encodeFloat32(n float32) ([]byte, error) {
38 enc.buf = strconv.AppendFloat(enc.buf, float64(n), 'f', -1, 32)
39 return enc.buf, nil
40}
41
42// AddFloat adds a float64 to be encoded, must be used inside a slice or array encoding (does not encode a key)
43func (enc *Encoder) AddFloat(v float64) {

Callers 2

EncodeFloat32Method · 0.95
marshalFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected