Delete Data Conversion Tool

pull/2059/head
skiffer-git 2 years ago
parent a2459cc9b5
commit 1e5e116532

@ -66,15 +66,14 @@ type checkFunc struct {
} }
// colorErrPrint prints formatted string in red to stderr // colorErrPrint prints formatted string in red to stderr
func colorErrPrint(format string, a ...interface{}) { func colorErrPrint(msg string) {
// ANSI escape code for red text // ANSI escape code for red text
const redColor = "\033[31m" const redColor = "\033[31m"
// ANSI escape code to reset color // ANSI escape code to reset color
const resetColor = "\033[0m" const resetColor = "\033[0m"
// Format the string as per provided format and arguments // Format the string as per provided format and arguments
errMsg := fmt.Sprintf(format, a...)
// Print to stderr in red // Print to stderr in red
fmt.Fprintf(os.Stderr, redColor+errMsg+resetColor) fmt.Fprintf(os.Stderr, "%s", msg)
} }
func colorSuccessPrint(format string, a ...interface{}) { func colorSuccessPrint(format string, a ...interface{}) {
@ -125,7 +124,7 @@ func main() {
if errors.Is(err, errMinioNotEnabled) || if errors.Is(err, errMinioNotEnabled) ||
errors.Is(err, errSignEndPoint) || errors.Is(err, errSignEndPoint) ||
errors.Is(err, errApiURL) { 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 checks[index].flag = true
continue continue
} }

Loading…
Cancel
Save