print errors to stderr, just use fmt for now
This commit is contained in:
parent
594a756704
commit
342ffb491d
@ -10,8 +10,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@ -37,7 +37,7 @@ func main() {
|
|||||||
case nil:
|
case nil:
|
||||||
ucl := strings.ToUpper(line)
|
ucl := strings.ToUpper(line)
|
||||||
if _, err = out.WriteString(ucl); err != nil {
|
if _, err = out.WriteString(ucl); err != nil {
|
||||||
log.Println(err)
|
fmt.Fprintln(os.Stderr, "error:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ func main() {
|
|||||||
// Otherwise there's a problem; print the
|
// Otherwise there's a problem; print the
|
||||||
// error and exit with non-zero status.
|
// error and exit with non-zero status.
|
||||||
default:
|
default:
|
||||||
log.Println(err)
|
fmt.Fprintln(os.Stderr, "error:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user