watch: Fix prototype to be more restrictive.

Change-Id: Ic744312efa91cf5c2dc2810e597353a080dccb70
1 file changed
tree: ea2b823d4d5a57f9aff3789e275222d861be0683
  1. cmd/
  2. Godeps/
  3. ratelimiter/
  4. util/
  5. vendor/
  6. watch/
  7. winfile/
  8. .gitignore
  9. .travis.yml
  10. CHANGES.md
  11. Dockerfile
  12. LICENSE.txt
  13. Makefile
  14. README.md
  15. tail.go
  16. tail_posix.go
  17. tail_test.go
  18. tail_windows.go
README.md

Build Status

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.

Log rotation

Tail comes with full support for truncation/move detection as it is designed to work with log rotation tools.

Installing

go get github.com/hpcloud/tail/...

Windows support

This package needs assistance for full Windows support.