(b []byte)
| 22 | ) |
| 23 | |
| 24 | func 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 | |
| 37 | func skipSpaces(b []byte) []byte { |
| 38 | if len(b) > 0 && b[0] <= 0x20 { |
no test coverage detected
searching dependent graphs…