readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The first whitespace byte encountered is still copied into p.currentByte, but not into p.currentToken.
()
| 562 | // first whitespace byte encountered is still copied into p.currentByte, but not |
| 563 | // into p.currentToken. |
| 564 | func (p *TextParser) readTokenUntilWhitespace() { |
| 565 | p.currentToken.Reset() |
| 566 | for p.err == nil && !isBlankOrTab(p.currentByte) && p.currentByte != '\n' { |
| 567 | p.currentToken.WriteByte(p.currentByte) |
| 568 | p.currentByte, p.err = p.buf.ReadByte() |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | // readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first |
| 573 | // byte considered is the byte already read (now in p.currentByte). The first |
no test coverage detected