Compare commits

..

No commits in common. "94065c21adcd8444fecd1bc1a8c80805ca273154" and "a61be775d52098fe8f8bd2a3b4cbcc0ca862d595" have entirely different histories.

3 changed files with 6 additions and 11 deletions

2
.gitignore vendored
View File

@ -205,5 +205,3 @@ example
*.adoc
tpsemester
semestergen
main-packr.go
packrd

View File

@ -1,10 +1,5 @@
build: gendates.go
packr2 build
run: build *.adoc.tpl c311.toml
./semestergen c311.toml
clean:
@rm -rf packrd main-packr.go semestergen
.PHONY: clean
build: gendates.go
go build

View File

@ -24,6 +24,8 @@ var tplMap = map[string]string{
"course": "course.task.tpl",
}
var linkChecker = mkLinkChecker()
type DayMap map[int]time.Time
type Eval struct {
@ -219,7 +221,7 @@ func writeSyllabus(c Config) error {
return err
}
var linkChecker = func() func(Link) Link {
func mkLinkChecker() func(Link) Link {
ids := map[string]bool{}
return func(l Link) Link {
if !ids[l.Title] {
@ -241,7 +243,7 @@ var linkChecker = func() func(Link) Link {
return l
}
}()
}
func mkConfig(path string) Config {
var c Config