MCPcopy Create free account
hub / github.com/segmentio/encoding / decodeUint

Method decodeUint

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

Source from the content-addressed store, hash-verified

129}
130
131func (d decoder) decodeUint(b []byte, p unsafe.Pointer) ([]byte, error) {
132 if hasNullPrefix(b) {
133 return b[4:], nil
134 }
135
136 v, r, err := d.parseUint(b, uintType)
137 if err != nil {
138 return r, err
139 }
140
141 *(*uint)(p) = uint(v)
142 return r, nil
143}
144
145func (d decoder) decodeUintptr(b []byte, p unsafe.Pointer) ([]byte, error) {
146 if hasNullPrefix(b) {

Callers

nothing calls this directly

Calls 2

parseUintMethod · 0.95
hasNullPrefixFunction · 0.85

Tested by

no test coverage detected