Read a file in reverse line-by-line.
Inspired by: a gonuts discussion.
Documentation: in godoc.
... f, err := rfile.Open(file) if err != nil { // handle err } for { line, err := f.ReadLine() if err != nil { if err != io.EOF { // handle error } break // must be io.EOF } // do something with "line" } f.Close() ...