MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / scanDigits

Method scanDigits

pkg/filter/ql/lexer.go:291–302  ·  view source on GitHub ↗

scanDigits consumes a contiguous series of digits.

()

Source from the content-addressed store, hash-verified

289
290// scanDigits consumes a contiguous series of digits.
291func (s *scanner) scanDigits() string {
292 var buf bytes.Buffer
293 for {
294 ch, _ := s.r.read()
295 if !isDigit(ch) {
296 s.r.unread()
297 break
298 }
299 _, _ = buf.WriteRune(ch)
300 }
301 return buf.String()
302}
303
304// scanBareIdent reads bare identifier from a rune reader.
305func scanBareIdent(r io.RuneScanner) string {

Callers 1

scanNumberMethod · 0.95

Calls 4

isDigitFunction · 0.85
unreadMethod · 0.80
StringMethod · 0.65
readMethod · 0.45

Tested by

no test coverage detected