From e5ff0c7e988e99a5eb94f1603b5c91def3ebe4d6 Mon Sep 17 00:00:00 2001 From: strogiyotec Date: Mon, 7 Sep 2020 21:20:42 -0700 Subject: [PATCH] check if config has any colors --- util.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util.go b/util.go index 5ecb373..4c2425f 100644 --- a/util.go +++ b/util.go @@ -63,12 +63,18 @@ func summerizeTasks(config *Config, tasks []*Task) { fmt.Printf(" ") } // user specified color mapping exists - if color := config.Colors.Get(tag); color != nil { - color.Printf("%s", tag) + if config.Colors != nil { + if color := config.Colors.Get(tag); color != nil { + color.Printf("%s", tag) + } else { + // no color mapping for tag + fmt.Printf("%s", tag) + } } else { // no color mapping fmt.Printf("%s", tag) } + } fmt.Printf("]") }