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

Method parseTrue

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

Source from the content-addressed store, hash-verified

266}
267
268func (d decoder) parseTrue(b []byte) ([]byte, []byte, Kind, error) {
269 if hasTruePrefix(b) {
270 return b[:4], b[4:], True, nil
271 }
272 if len(b) < 4 {
273 return nil, b[len(b):], Undefined, unexpectedEOF(b)
274 }
275 return nil, b, Undefined, syntaxError(b, "expected 'true' but found invalid token")
276}
277
278func (d decoder) parseFalse(b []byte) ([]byte, []byte, Kind, error) {
279 if hasFalsePrefix(b) {

Callers 2

parseValueMethod · 0.95
NextMethod · 0.80

Calls 3

hasTruePrefixFunction · 0.85
unexpectedEOFFunction · 0.85
syntaxErrorFunction · 0.85

Tested by

no test coverage detected