Merge remote-tracking branch 'origin/v2.10.6-bug100770-inotify-leak' into release-v2.10-patches
tree: 17e3aec4427f893b10c6ebff5b0ea7ba0c31baf3
  1. cmd/
  2. .gitignore
  3. inotify_tracker.go
  4. LICENSE.txt
  5. Makefile
  6. README.md
  7. tail.go
  8. tail_test.go
  9. watch.go
README.md

Tail implementation in Go

A Go package striving to emulate the BSD tail program.

t := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
for line := range t.Lines {
    fmt.Println(line.Text)
}

Installing

go get github.com/ActiveState/tail

Building

To build and test the package,

make test

To build the command-line program gotail,

cd cmd/gotail
make
./gotail -h

TODO

  • Support arbitrary values for Location