Go to file
Sridhar Ratnakumar 1a694c85a6 test refactoring: use struct embedding to reuse semantics 2012-10-13 13:04:50 -07:00
cmd/gotail allow gotail to accept multiple files 2012-10-12 17:28:04 -07:00
.gitignore test case for "-F" (follow by name) 2012-10-13 12:11:50 -07:00
Makefile test: fixture workflow to make test functions concise 2012-10-13 11:44:47 -07:00
README.md start working on tail's readme/example 2012-10-12 09:05:11 -07:00
tail.go MaxLineSize now splits longer lines without discarding the rest 2012-10-13 12:50:27 -07:00
tail_test.go test refactoring: use struct embedding to reuse semantics 2012-10-13 13:04:50 -07:00
watch.go test: fixture workflow to make test functions concise 2012-10-13 11:44:47 -07:00

README.md

Tail implementation in Go

A Go package striving to emulate the BSD tail program.

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

TODO

  • tests
  • command line program (tail -f ...)
  • refactor: use Config? NewTail(tail.Config{Filename: "", Follow: tail.FOLLOW_NAME})
  • refactor: get rid of 'end' flag; allow -n <number> with -n -1 for end.