summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)