()
| 215 | } |
| 216 | |
| 217 | func defaultScanner() Scanner { |
| 218 | // Using a function rather than a global is intentional; this function is |
| 219 | // inlined as pure code (zeroing + moves), whereas a global requires write |
| 220 | // barriers since the memory is mutable. |
| 221 | return Scanner{skipTrivia: true} |
| 222 | } |
| 223 | |
| 224 | func NewScanner() *Scanner { |
| 225 | s := defaultScanner() |
no outgoing calls
no test coverage detected