summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2015-10-23 19:32:53 +0200
committerSilvan Jegen <s.jegen@gmail.com>2015-10-27 21:40:57 +0100
commit8c7d508a91a7aa27b2a4b07e22b5bb624f0e0e44 (patch)
tree95548bfdba0d18c63f17a01b2ff52d3610ad3ac1
parent2da5a54817dd0a6540e3c2f9895068eb5dffe04f (diff)
Ignore EOF
-rw-r--r--gwic.go6
1 files changed, 5 insertions, 1 deletions
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)