Author: strogiyotec [almas337519@gmail.com]
Hash: e5ff0c7e988e99a5eb94f1603b5c91def3ebe4d6
Timestamp: Tue, 08 Sep 2020 04:20:42 +0000 (4 years ago)

+8 -2 +/-1 browse
check if config has any colors
1diff --git a/util.go b/util.go
2index 5ecb373..4c2425f 100644
3--- a/util.go
4+++ b/util.go
5 @@ -63,12 +63,18 @@ func summerizeTasks(config *Config, tasks []*Task) {
6 fmt.Printf(" ")
7 }
8 // user specified color mapping exists
9- if color := config.Colors.Get(tag); color != nil {
10- color.Printf("%s", tag)
11+ if config.Colors != nil {
12+ if color := config.Colors.Get(tag); color != nil {
13+ color.Printf("%s", tag)
14+ } else {
15+ // no color mapping for tag
16+ fmt.Printf("%s", tag)
17+ }
18 } else {
19 // no color mapping
20 fmt.Printf("%s", tag)
21 }
22+
23 }
24 fmt.Printf("]")
25 }