From d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 29 Dec 2024 19:07:03 +0000 Subject: clog: Remove extra newline and fix stderr --- clog/clog.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clog/clog.go b/clog/clog.go index 8401665..b876574 100644 --- a/clog/clog.go +++ b/clog/clog.go @@ -6,7 +6,7 @@ import ( ) func log(str string, keyvals []any) { - fmt.Print(str + " ") + fmt.Fprint(os.Stderr, str + " ") for i, j := range keyvals { if i&1 == 0 { fmt.Fprintf(os.Stderr, "%v=", j) @@ -16,7 +16,7 @@ func log(str string, keyvals []any) { fmt.Fprintf(os.Stderr, "%#v ", j) } } - fmt.Fprintln(os.Stderr, "\n") + fmt.Fprintln(os.Stderr) } func Error(str string, keyvals ...any) { -- cgit v1.2.3