MCPcopy Create free account
hub / github.com/vmihailenco/msgpack / encodeUint8Cond

Method encodeUint8Cond

encode_number.go:15–20  ·  view source on GitHub ↗
(n uint8)

Source from the content-addressed store, hash-verified

13}
14
15func (e *Encoder) encodeUint8Cond(n uint8) error {
16 if e.flags&useCompactIntsFlag != 0 {
17 return e.EncodeUint(uint64(n))
18 }
19 return e.EncodeUint8(n)
20}
21
22// EncodeUint16 encodes an uint16 in 3 bytes preserving type of the number.
23func (e *Encoder) EncodeUint16(n uint16) error {

Callers 1

encodeUint8CondValueFunction · 0.80

Calls 2

EncodeUintMethod · 0.95
EncodeUint8Method · 0.95

Tested by

no test coverage detected