From d30faf0fcd807b8eafc193533f02d87c014fe59e Mon Sep 17 00:00:00 2001 From: adnano Date: Sat, 20 Mar 2021 23:45:55 -0400 Subject: [PATCH] config: Fix crash caused by nil map --- config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.go b/config.go index 2901338..45a26ee 100644 --- a/config.go +++ b/config.go @@ -38,6 +38,9 @@ func (t Task) Format(p *Page) (string, []byte) { // LoadConfig loads the configuration from the provided path. func LoadConfig(path string) (*Config, error) { c := new(Config) + c.Feeds = make(map[string]string) + c.Tasks = make(map[string]*Task) + f, err := os.Open(path) if err != nil { return nil, err