diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2015-10-23 19:32:53 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2015-10-27 21:40:57 +0100 |
commit | 8c7d508a91a7aa27b2a4b07e22b5bb624f0e0e44 (patch) | |
tree | 95548bfdba0d18c63f17a01b2ff52d3610ad3ac1 | |
parent | 2da5a54817dd0a6540e3c2f9895068eb5dffe04f (diff) |
Ignore EOF
-rw-r--r-- | gwic.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |