diff --git a/buffer/buffer.go b/buffer/buffer.go index 3ad1e5722..a8bc24df4 100644 --- a/buffer/buffer.go +++ b/buffer/buffer.go @@ -98,6 +98,7 @@ func (b *Buffer) Write(bs []byte) (int, error) { return len(bs), nil } +// TrimNewline trims any final "\n" byte from the end of the buffer. func (b *Buffer) TrimNewline() { if i := len(b.bs) - 1; i >= 0 { if b.bs[i] == '\n' {