MCPcopy Create free account
hub / github.com/donatj/sqlread / peek

Method peek

scanner.go:107–118  ·  view source on GitHub ↗
(s int)

Source from the content-addressed store, hash-verified

105}
106
107func (l *lexer) peek(s int) (int, []byte) {
108 b := make([]byte, s)
109
110 n, err := l.input.ReadAt(b, l.pos)
111 if err == io.EOF {
112 return n, b
113 } else if err != nil {
114 panic(err)
115 }
116
117 return n, b
118}
119
120func (l *lexer) hasPrefix(s string) bool {
121 x := []byte(s)

Callers 6

nextMethod · 0.95
hasPrefixMethod · 0.95
hasPrefixIMethod · 0.95
StartIntpStateMethod · 0.80
StartStateFunction · 0.80
eatDelimStrFunction · 0.80

Calls 1

ReadAtMethod · 0.45

Tested by

no test coverage detected