MCPcopy Create free account
hub / github.com/prometheus/common / skipBlankTab

Method skipBlankTab

expfmt/text_parse.go:544–550  ·  view source on GitHub ↗

skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte that is neither ' ' nor '\t'. That byte is left in p.currentByte.

()

Source from the content-addressed store, hash-verified

542// skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte
543// that is neither ' ' nor '\t'. That byte is left in p.currentByte.
544func (p *TextParser) skipBlankTab() {
545 for {
546 if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil || !isBlankOrTab(p.currentByte) {
547 return
548 }
549 }
550}
551
552// skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do
553// anything if p.currentByte is neither ' ' nor '\t'.

Callers 6

startOfLineMethod · 0.95
startCommentMethod · 0.95
startLabelNameMethod · 0.95
startLabelValueMethod · 0.95
startTimestampMethod · 0.95

Calls 1

isBlankOrTabFunction · 0.85

Tested by

no test coverage detected