From d29163f019e675ed9366d904fd47c31fc67c46d9 Mon Sep 17 00:00:00 2001 From: dojinkimm Date: Mon, 8 Jun 2020 10:21:13 +0900 Subject: [PATCH] Fix undefined c issue (#28) --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index b22b0c7..e69d76b 100644 --- a/main.go +++ b/main.go @@ -94,6 +94,8 @@ func consume(wg *sync.WaitGroup, r io.Reader) { } } +var c *color.Color + func parse(line string) { trimmed := strings.TrimSpace(line) defer color.Unset() @@ -152,7 +154,7 @@ func setPalette() { return } if c, ok := colors[vals[0]]; ok { - fail = c + fail = color.Set(c) } if c, ok := colors[vals[1]]; ok { pass = color.New(c)