5ccafcc3d6
* initialize `Size` with the then-size of the file when ChangeEvents is called. remember that this function is expected to be called many times, one after another. this also passes the TestReSeekInotify test. * do not ignore errors from os.Stat. we panic errors like these now, but ideally should switch to tomb.Tomb for letting the user handle them. |
||
---|---|---|
cmd/gotail | ||
.gitignore | ||
CHANGES.md | ||
LICENSE.txt | ||
Makefile | ||
README.md | ||
tail.go | ||
tail_test.go | ||
watch.go |
README.md
Go package for tail-ing files
A Go package striving to emulate the features of the BSD tail
program.
t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
for line := range t.Lines {
fmt.Println(line.Text)
}
See API documentation.
Installing
go get github.com/ActiveState/tail
Building
To build and test the package,
make test
To build the toy command-line program gotail
,
cd cmd/gotail
make
./gotail -h
TODO
- Support arbitrary values for
Location