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

Method encodeInt

encode_number_int.go:19–22  ·  view source on GitHub ↗

encodeInt encodes an int to JSON

(n int)

Source from the content-addressed store, hash-verified

17
18// encodeInt encodes an int to JSON
19func (enc *Encoder) encodeInt(n int) ([]byte, error) {
20 enc.buf = strconv.AppendInt(enc.buf, int64(n), 10)
21 return enc.buf, nil
22}
23
24// EncodeInt64 encodes an int64 to JSON
25func (enc *Encoder) EncodeInt64(n int64) error {

Callers 2

EncodeIntMethod · 0.95
marshalFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected