diff --git a/README.md b/README.md index 6cb80d3..2ad2f69 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,3 @@ designed to work with log rotation tools. go get github.com/ActiveState/tail/... -## TODO - -* Arbitrary values for `Location` -* `Location` could be specified in both lines and bytes metrics. - diff --git a/tail.go b/tail.go index 91c2600..36cb4b9 100644 --- a/tail.go +++ b/tail.go @@ -24,6 +24,7 @@ type Line struct { // log line itself. } +// SeekInfo represents arguments to `os.Seek` type SeekInfo struct { Offset int64 Whence int // os.SEEK_* @@ -31,7 +32,7 @@ type SeekInfo struct { // Config is used to specify how a file must be tailed. type Config struct { - Location *SeekInfo // Seek before tailing + Location *SeekInfo // Seek to this location before tailing Follow bool // Continue looking for new lines (tail -f) ReOpen bool // Reopen recreated files (tail -F) MustExist bool // Fail early if the file does not exist