aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-14 13:44:18 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-14 13:44:18 +0800
commitc72555f0b820e68acb723e3fd0467da493614a51 (patch)
tree112918826d7362cffe4749f6d5157a31481eaa88
parentclog: Remove unused keyvals (diff)
downloadgo-lindenii-common-c72555f0b820e68acb723e3fd0467da493614a51.tar.gz
go-lindenii-common-c72555f0b820e68acb723e3fd0467da493614a51.tar.zst
go-lindenii-common-c72555f0b820e68acb723e3fd0467da493614a51.zip
clog: Clear colors
-rw-r--r--clog/clog.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/clog/clog.go b/clog/clog.go
index 99f4bd6..76b199b 100644
--- a/clog/clog.go
+++ b/clog/clog.go
@@ -20,7 +20,7 @@ func logs(str string, keyvals []any) {
}
}
}
- fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, "\x1b[0m")
}
func Errors(str string, keyvals ...any) {
@@ -45,7 +45,8 @@ func Fatals(exit int, str string, keyvals ...any) {
}
func log(str string) {
- fmt.Fprintln(os.Stderr, str)
+ fmt.Fprint(os.Stderr, str)
+ fmt.Fprintln(os.Stderr, "\x1b[0m")
}
func Error(str string) {