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

Function internalParseFlags

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

Source from the content-addressed store, hash-verified

22)
23
24func internalParseFlags(b []byte) (flags ParseFlags) {
25 // Don't consider surrounding whitespace
26 b = skipSpaces(b)
27 b = trimTrailingSpaces(b)
28 if ascii.ValidPrint(b) {
29 flags |= validAsciiPrint
30 }
31 if bytes.IndexByte(b, '\\') == -1 {
32 flags |= noBackslash
33 }
34 return
35}
36
37func skipSpaces(b []byte) []byte {
38 if len(b) > 0 && b[0] <= 0x20 {

Callers 5

ParseFunction · 0.85
ValidFunction · 0.85
readValueMethod · 0.85
NewTokenizerFunction · 0.85
ResetMethod · 0.85

Calls 3

ValidPrintFunction · 0.92
skipSpacesFunction · 0.85
trimTrailingSpacesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…