mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
chasquid-util: Print errors to stderr
To make it more difficult to accidentally supress errors, or mistake them for legitimate output, print errors to stderr.
This commit is contained in:
@@ -96,9 +96,10 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Fatalf prints the given message, then exits the program with an error code.
|
||||
// Fatalf prints the given message to stderr, then exits the program with an
|
||||
// error code.
|
||||
func Fatalf(s string, arg ...interface{}) {
|
||||
fmt.Printf(s+"\n", arg...)
|
||||
fmt.Fprintf(os.Stderr, s+"\n", arg...)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user