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

Method parseNull

json/parse.go:258–266  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

256}
257
258func (d decoder) parseNull(b []byte) ([]byte, []byte, Kind, error) {
259 if hasNullPrefix(b) {
260 return b[:4], b[4:], Null, nil
261 }
262 if len(b) < 4 {
263 return nil, b[len(b):], Undefined, unexpectedEOF(b)
264 }
265 return nil, b, Undefined, syntaxError(b, "expected 'null' but found invalid token")
266}
267
268func (d decoder) parseTrue(b []byte) ([]byte, []byte, Kind, error) {
269 if hasTruePrefix(b) {

Callers 2

parseValueMethod · 0.95
NextMethod · 0.80

Calls 3

hasNullPrefixFunction · 0.85
unexpectedEOFFunction · 0.85
syntaxErrorFunction · 0.85

Tested by

no test coverage detected