diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-29 19:07:03 +0000 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-29 19:07:03 +0000 |
commit | d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0 (patch) | |
tree | 55d4e22b6f3b795225532c36aaf57310295a6452 /clog/clog.go | |
parent | clog: Info (diff) | |
download | go-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.tar.gz go-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.tar.zst go-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.zip |
clog: Remove extra newline and fix stderr
Diffstat (limited to 'clog/clog.go')
-rw-r--r-- | clog/clog.go | 4 |
1 files 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) { |