aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-29 19:07:03 +0000
committerRunxi Yu <me@runxiyu.org>2024-12-29 19:07:03 +0000
commitd3200e498d53e2c4fd527a6507ebe4acfe3e2cf0 (patch)
tree55d4e22b6f3b795225532c36aaf57310295a6452
parentclog: Info (diff)
downloadgo-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.tar.gz
go-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.tar.zst
go-lindenii-common-d3200e498d53e2c4fd527a6507ebe4acfe3e2cf0.zip
clog: Remove extra newline and fix stderr
-rw-r--r--clog/clog.go4
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) {