summaryrefslogtreecommitdiff
path: root/internal/colour/colour.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-13 10:01:59 +0200
committerPaul Buetow <paul@buetow.org>2026-03-13 10:01:59 +0200
commit44a426c883a2c448d40a19903c822d03e5cf70af (patch)
treedbb1fe11db1993c2cac7daf1c9930e37f44b38d1 /internal/colour/colour.go
parentcfddc5696f4956081630e3d394ef3d8c652af02e (diff)
chore: complete code quality audit fixesv1.2.6
- Fixed failing test in config_test.go (hardcoded date) - Addressed unchecked error returns from Close() operations - Refactored large functions to follow SRP (run.go and main.go) - Added documentation to exported identifiers - Fixed linting errors (error message capitalization, errcheck) - Bumped version to v1.2.6
Diffstat (limited to 'internal/colour/colour.go')
-rw-r--r--internal/colour/colour.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/colour/colour.go b/internal/colour/colour.go
index 3bdfffe..374a5b4 100644
--- a/internal/colour/colour.go
+++ b/internal/colour/colour.go
@@ -17,9 +17,15 @@ var (
warnCol = color.New(color.FgHiWhite, color.BgRed)
Warnln = warnCol.PrintlnFunc()
+ errorCol = color.New(color.FgRed)
+ Errorln = errorCol.PrintlnFunc()
+
successCol = color.New(color.FgWhite, color.BgGreen)
Successfln = func(format string, args ...any) {
- successCol.Printf(format, args...)
+ if _, err := successCol.Printf(format, args...); err != nil {
+ // Log the error but don't fail the operation since we've already printed the data
+ Errorln("Error printing success message:", err)
+ }
fmt.Print("\n")
}