some more header and footer work

This commit is contained in:
Mark McGranaghan
2012-10-09 19:21:52 -07:00
parent f9ef42b960
commit e358ea1267
3 changed files with 27 additions and 3 deletions

View File

@@ -124,8 +124,9 @@ type Seg struct {
}
type Chapter struct {
Id, Name string
Segs [][]*Seg
Id, Name string
Segs [][]*Seg
NextChapter *Chapter
}
func parseSegs(sourcePath string) []*Seg {
@@ -208,6 +209,11 @@ func parseChapters() []*Chapter {
chapters = append(chapters, &chapter)
}
}
for i, chapter := range chapters {
if i < (len(chapters) - 1) {
chapter.NextChapter = chapters[i+1]
}
}
return chapters
}