MCPcopy Index your code
hub / github.com/segmentio/encoding / decodeInt

Method decodeInt

json/decode.go:49–61  ·  view source on GitHub ↗
(b []byte, p unsafe.Pointer)

Source from the content-addressed store, hash-verified

47}
48
49func (d decoder) decodeInt(b []byte, p unsafe.Pointer) ([]byte, error) {
50 if hasNullPrefix(b) {
51 return b[4:], nil
52 }
53
54 v, r, err := d.parseInt(b, intType)
55 if err != nil {
56 return r, err
57 }
58
59 *(*int)(p) = int(v)
60 return r, nil
61}
62
63func (d decoder) decodeInt8(b []byte, p unsafe.Pointer) ([]byte, error) {
64 if hasNullPrefix(b) {

Callers

nothing calls this directly

Calls 2

parseIntMethod · 0.95
hasNullPrefixFunction · 0.85

Tested by

no test coverage detected