You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code I need to detect EOF to do some decisions (basically flush the line stack in multiline parser). However tail does not export the file handle file thus I have to write my own short func to use os.Open the file, seek to the position where tail.Tell() is and try to read one byte to see if I got error is EOF.
This is not efficient I think. In my opinion there should be a better way tail package can export the state for us. Or at least export the file handle so I don't have to call one system os.Open again.
Any ideas to solve it? Or I am missing the doco and not using it right.
Thanks for excellent work and Kind regards
The text was updated successfully, but these errors were encountered:
Hi,
In my code I need to detect EOF to do some decisions (basically flush the line stack in multiline parser). However
tail
does not export the file handlefile
thus I have to write my own short func to use os.Open the file, seek to the position where tail.Tell() is and try to read one byte to see if I got error is EOF.This is not efficient I think. In my opinion there should be a better way tail package can export the state for us. Or at least export the file handle so I don't have to call one system os.Open again.
Any ideas to solve it? Or I am missing the doco and not using it right.
Thanks for excellent work and Kind regards
The text was updated successfully, but these errors were encountered: