MCPcopy
hub / github.com/valyala/quicktemplate / newScanner

Function newScanner

parser/scanner.go:78–88  ·  view source on GitHub ↗
(r io.Reader, filePath string)

Source from the content-addressed store, hash-verified

76var prevBlank = regexp.MustCompile(`[[:blank:]]+$`)
77
78func newScanner(r io.Reader, filePath string) *scanner {
79 // Substitute backslashes with forward slashes in filePath
80 // for the sake of consistency on different platforms (windows, linux).
81 // See https://github.com/valyala/quicktemplate/issues/62.
82 filePath = strings.Replace(filePath, "\\", "/", -1)
83
84 return &scanner{
85 r: bufio.NewReader(r),
86 filePath: filePath,
87 }
88}
89
90func (s *scanner) Rewind() {
91 if s.rewind {

Callers 3

parseFunction · 0.85
testScannerFailureFunction · 0.85
testScannerSuccessFunction · 0.85

Calls

no outgoing calls

Tested by 2

testScannerFailureFunction · 0.68
testScannerSuccessFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…