hpcloud / tail

Go package for reading from continously updated files (tail -f)
MIT License
2.71k stars 503 forks source link

Does not trim dos newlines correctly. #121

Open danielnelson opened 7 years ago

danielnelson commented 7 years ago

If the tailed file has dos line endings, they are not trimmed properly.

Given the following input file:

line number 1
line number 2

If the file has dos line endings the "%q\n" formatted lines are:

"line number 1\r"
"line number 2\r"

I am expecting the same lines as if it had unix line endings:

"line number 1"
"line number 2"