MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / EncodeInt8

Method EncodeInt8

encode_number.go:59–61  ·  view source on GitHub ↗

EncodeInt8 encodes an int8 in 2 bytes preserving type of the number.

(n int8)

Source from the content-addressed store, hash-verified

57
58// EncodeInt8 encodes an int8 in 2 bytes preserving type of the number.
59func (e *Encoder) EncodeInt8(n int8) error {
60 return e.write1(msgpcode.Int8, uint8(n))
61}
62
63func (e *Encoder) encodeInt8Cond(n int8) error {
64 if e.flags&useCompactIntsFlag != 0 {

Callers 2

encodeInt8CondMethod · 0.95
EncodeIntMethod · 0.95

Calls 1

write1Method · 0.95

Tested by

no test coverage detected