diff --git a/tail.go b/tail.go index fa645f1..c74a295 100644 --- a/tail.go +++ b/tail.go @@ -31,7 +31,9 @@ func tailFile(ctx context.Context, file string, poll bool, dest *os.File) { return // get the next log line and echo it out case line := <-t.Lines: - fmt.Fprintln(dest, line.Text) + if line != nil { + fmt.Fprintln(dest, line.Text) + } } } }