From 20595a7d7f62a580007d66b12475835a1f7c77ed Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Thu, 23 Apr 2020 11:46:18 -0400 Subject: [PATCH] not sure why, but linkchecker is a var now --- gendates.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gendates.go b/gendates.go index e17a70c..97235fd 100644 --- a/gendates.go +++ b/gendates.go @@ -24,8 +24,6 @@ var tplMap = map[string]string{ "course": "course.task.tpl", } -var linkChecker = mkLinkChecker() - type DayMap map[int]time.Time type Eval struct { @@ -221,7 +219,7 @@ func writeSyllabus(c Config) error { return err } -func mkLinkChecker() func(Link) Link { +var linkChecker = func() func(Link) Link { ids := map[string]bool{} return func(l Link) Link { if !ids[l.Title] { @@ -243,7 +241,7 @@ func mkLinkChecker() func(Link) Link { return l } -} +}() func mkConfig(path string) Config { var c Config