From 342ffb491d17146a321b520ef6acc982eeb11ddd Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Tue, 16 Oct 2012 10:36:58 -0700 Subject: [PATCH] print errors to stderr, just use fmt for now --- examples/line-filters/line-filters.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/line-filters/line-filters.go b/examples/line-filters/line-filters.go index a941f38..8cd9af5 100644 --- a/examples/line-filters/line-filters.go +++ b/examples/line-filters/line-filters.go @@ -10,8 +10,8 @@ package main import ( "bufio" + "fmt" "io" - "log" "os" "strings" ) @@ -37,7 +37,7 @@ func main() { case nil: ucl := strings.ToUpper(line) if _, err = out.WriteString(ucl); err != nil { - log.Println(err) + fmt.Fprintln(os.Stderr, "error:", err) os.Exit(1) } @@ -49,7 +49,7 @@ func main() { // Otherwise there's a problem; print the // error and exit with non-zero status. default: - log.Println(err) + fmt.Fprintln(os.Stderr, "error:", err) os.Exit(1) } }