From 9ed00cd67ce7bd5ca9fb602f94cdfc4084cb021a Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 21 Jun 2025 06:44:08 +0100 Subject: [PATCH] return colourless check/cross marks if NO_COLOR is set --- util.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/util.go b/util.go index 73d7e3a..c98c25a 100644 --- a/util.go +++ b/util.go @@ -2,7 +2,10 @@ package main -import "strings" +import ( + "os" + "strings" +) func snakeCaseToTitleCase(snake string) string { words := strings.Split(snake, "_") @@ -16,9 +19,15 @@ func snakeCaseToTitleCase(snake string) string { func getEnabledMark(enabled bool) string { if enabled { - return "\u2713" // check mark + if os.Getenv("NO_COLOR") != "" { // nolint: misspell + return "✓" + } + return "✅" } - return "\u274c" // cross mark + if os.Getenv("NO_COLOR") != "" { // nolint: misspell + return "✗" + } + return "❌" } func trimPrefix(s, prefix string) string {