From c72555f0b820e68acb723e3fd0467da493614a51 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 14 Feb 2025 13:44:18 +0800 Subject: [PATCH] clog: Clear colors --- clog/clog.go | 5 +++-- diff --git a/clog/clog.go b/clog/clog.go index 99f4bd6c99c67a8c3ef8feba5d60d5bc8f4c9473..76b199b1ca91d577dfc74a517742457a2e50d894 100644 --- a/clog/clog.go +++ b/clog/clog.go @@ -20,7 +20,7 @@ fmt.Fprintf(os.Stderr, "%#v ", j) } } } - fmt.Fprintln(os.Stderr) + fmt.Fprintln(os.Stderr, "\x1b[0m") } func Errors(str string, keyvals ...any) { @@ -45,7 +45,8 @@ os.Exit(exit) } func log(str string) { - fmt.Fprintln(os.Stderr, str) + fmt.Fprint(os.Stderr, str) + fmt.Fprintln(os.Stderr, "\x1b[0m") } func Error(str string) { -- 2.48.1