Go to file
Sridhar Ratnakumar 4bbf3d28cc gracefully manage goroutines death using tomb
http://blog.labix.org/2011/10/09/death-of-goroutines-under-control
2012-10-12 16:28:22 -07:00
cmd/tail start working on tail's readme/example 2012-10-12 09:05:11 -07:00
Makefile use struct to configure the growing tail args; start working on unit tests 2012-10-12 14:32:04 -07:00
README.md start working on tail's readme/example 2012-10-12 09:05:11 -07:00
tail.go gracefully manage goroutines death using tomb 2012-10-12 16:28:22 -07:00
tail_test.go gracefully manage goroutines death using tomb 2012-10-12 16:28:22 -07:00
watch.go close the inotify watcher when returning 2012-10-12 07:09:36 -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.