From 85fe81677d88044cf4b6a15307865deee23e1bb1 Mon Sep 17 00:00:00 2001 From: "Anthony M. Cook" Date: Fri, 16 Apr 2021 20:40:25 -0500 Subject: [PATCH] Add color to warn messages --- src/blacklight.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blacklight.go b/src/blacklight.go index 7811f52..9365157 100644 --- a/src/blacklight.go +++ b/src/blacklight.go @@ -69,13 +69,13 @@ func loadFile(filename string) []rune { } func warn(text ...string) { - fmt.Fprint(os.Stderr, "blacklight: ") + fmt.Fprint(os.Stderr, "\033[31mblacklight: ") for _, line := range text { fmt.Fprint(os.Stderr, line) } - fmt.Fprintln(os.Stderr, "") + fmt.Fprintln(os.Stderr, "\033[0m") } func cleanup() {