From 8c7d508a91a7aa27b2a4b07e22b5bb624f0e0e44 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 23 Oct 2015 19:32:53 +0200 Subject: Ignore EOF --- gwic.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gwic.go b/gwic.go index cb086b2..2a28f43 100644 --- a/gwic.go +++ b/gwic.go @@ -4,6 +4,7 @@ import ( "bufio" "flag" "fmt" + "io" "os" "regexp" "strings" @@ -137,7 +138,10 @@ func main() { } line, err = reader.ReadString(byte('\n')) } - fmt.Printf("Got an error: %q.\n", err) + if err != io.EOF { + fmt.Printf("Got an error: %q.\n", err) + } + c <- w close(c) }(sc) -- cgit v1.2.3