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

Method write4

encode_number.go:182–190  ·  view source on GitHub ↗
(code byte, n uint32)

Source from the content-addressed store, hash-verified

180}
181
182func (e *Encoder) write4(code byte, n uint32) error {
183 e.buf = e.buf[:5]
184 e.buf[0] = code
185 e.buf[1] = byte(n >> 24)
186 e.buf[2] = byte(n >> 16)
187 e.buf[3] = byte(n >> 8)
188 e.buf[4] = byte(n)
189 return e.write(e.buf)
190}
191
192func (e *Encoder) write8(code byte, n uint64) error {
193 e.buf = e.buf[:9]

Callers 9

EncodeMapLenMethod · 0.95
EncodeUint32Method · 0.95
EncodeInt32Method · 0.95
EncodeFloat32Method · 0.95
EncodeBytesLenMethod · 0.95
encodeStringLenMethod · 0.95
EncodeArrayLenMethod · 0.95
encodeExtLenMethod · 0.95

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected