Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Include stripped newlines #40

Unanswered
arturcarvalho asked this question in Q&A
Discussion options

If I understand correctly, the \n is being stripped:

tail/tail.go

Line 244 in 4472660

line = strings.TrimRight(line, "\n")

Is this trim necessary? It's causing me issues, because later I can't distinguish between line endings and regular \r (I'm joining all the text).

I suppose I can add some logic to add the \n again, but it seems a bit redundant.

Thanks and thank you very much for the library!

You must be logged in to vote

Replies: 1 comment

Comment options

I've commented the line out and it works for my use case. Do you think it would make sense to add a configuration flag to turn on/off the trim? I'd be happy to provide a PR.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /