not sure why, but linkchecker is a var now

This commit is contained in:
Chris Sexton 2020-04-23 11:46:18 -04:00
parent a61be775d5
commit 20595a7d7f
1 changed files with 2 additions and 4 deletions

View File

@ -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