explain what the +2 is for

/
This commit is contained in:
Sridhar Ratnakumar 2014-04-28 14:14:21 -07:00
parent 074c77ccbf
commit d2a44130c2
1 changed files with 1 additions and 0 deletions

View File

@ -312,6 +312,7 @@ func (tail *Tail) waitForChanges() error {
func (tail *Tail) newReader() *bufio.Reader {
if tail.MaxLineSize > 0 {
// add 2 to account for newline characters
return bufio.NewReaderSize(tail.file, tail.MaxLineSize+2)
} else {
return bufio.NewReader(tail.file)