From d2a44130c2cb2c9628a8fec3dd5d96940f446207 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 28 Apr 2014 14:14:21 -0700 Subject: [PATCH] explain what the +2 is for / --- tail.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tail.go b/tail.go index ee890a7..34ef4cc 100644 --- a/tail.go +++ b/tail.go @@ -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)