Uh oh!
There was an error while loading. Please reload this page.
Feature/line seeker - #108
Conversation
7dd12fc to
7a62e5cCompared8a03b5 to
2a149d7Compare@Nino-K This is passing now for 1.7+. This is because my package is using io.SeekStart, which replaced os.SEEK_SET in 1.7. I can update my package to handle this if its important to you. But maybe tail could drop those while adding 1.9? I have another PR that removed os.SEEK from tail and drops 1.5 and 1.6 from travis. |
StoicPerlman
commented
Dec 30, 2017
Added line seeker to gotail cmd. Switched -n from using position in file to lines. |
164f04a to
614cf3eCompare614cf3e to
4c42fd0Comparenishantroy
commented
Apr 22, 2018
@StoicPerlman any updates here? |
StoicPerlman
commented
Apr 22, 2018
@nishantroy This is working just fine for me. No word from the project maintainers. If you check out the Travis build you can see this PR its passing for Go 1.7+. I have another PR on this repo to remove some deprecated go features and drop support for under 1.7. I added this functionality by creating a library which is also passing all tests on master branch for 1.7+ If you are interested in looking it over you can find it here https://travis-ci.org/StoicPerlman/fls. If you want this functionality now just used my forked version until this gets merged. https://github.com/StoicPerlman/tail. |
| Pipe bool // Is a named pipe (mkfifo) | ||
| RateLimiter *ratelimiter.LeakyBucket | ||
| Location *SeekInfo // Seek to this location before tailing | ||
| LineLocation *SeekInfo // Seek to this line number before tailing |
There was a problem hiding this comment.
@nishantroy To make this work just set this LineLocation in the config. It works the the same way Location works, but instead of moving by position it moves by \n's.
Also see the README on the underlying library https://github.com/StoicPerlman/fls. If you have trouble using it just shoot me a message.
This is a a rough draft for issue #83 seek by line. Any feedback will be in PR update.
See https://github.com/StoicPerlman/fls to get info on how line seeking works
Tests pass locally in docker build but not in travis. Still working on this. Any advice would be helpful as I am pretty new to travis and go.