From 793f03ce2138d09e314a2a0773dc5c9595279be6 Mon Sep 17 00:00:00 2001 From: Jean de Klerk Date: Wed, 11 Oct 2017 19:17:28 -0600 Subject: [PATCH] Compile-able code in readme (currently this snippet fails 'unused var err' check) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ed8bd9ac..cb2a3c2a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ A Go package striving to emulate the features of the BSD `tail` program. ```Go t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true}) +if err != nil { + panic(err) +} + for line := range t.Lines { fmt.Println(line.Text) }