From 1e5e116532491b014c070af8c1c7f491b34086d5 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sat, 9 Mar 2024 11:36:20 +0800 Subject: [PATCH] Delete Data Conversion Tool --- tools/component/component.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/component/component.go b/tools/component/component.go index 6429cf04e..ddd6e6928 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -66,15 +66,14 @@ type checkFunc struct { } // colorErrPrint prints formatted string in red to stderr -func colorErrPrint(format string, a ...interface{}) { +func colorErrPrint(msg string) { // ANSI escape code for red text const redColor = "\033[31m" // ANSI escape code to reset color const resetColor = "\033[0m" // Format the string as per provided format and arguments - errMsg := fmt.Sprintf(format, a...) // Print to stderr in red - fmt.Fprintf(os.Stderr, redColor+errMsg+resetColor) + fmt.Fprintf(os.Stderr, "%s", msg) } func colorSuccessPrint(format string, a ...interface{}) { @@ -125,7 +124,7 @@ func main() { if errors.Is(err, errMinioNotEnabled) || errors.Is(err, errSignEndPoint) || errors.Is(err, errApiURL) { - colorErrPrint("Check ", check.name, err.Error()) + colorErrPrint(fmt.Sprintf("Check: %s, failed: %s", check.name, err.Error())) checks[index].flag = true continue }