(examples []*Example)
| 293 | } |
| 294 | |
| 295 | func renderIndex(examples []*Example) { |
| 296 | if verbose() { |
| 297 | fmt.Println("Rendering index") |
| 298 | } |
| 299 | indexTmpl := template.New("index") |
| 300 | template.Must(indexTmpl.Parse(mustReadFile("templates/footer.tmpl"))) |
| 301 | template.Must(indexTmpl.Parse(mustReadFile("templates/index.tmpl"))) |
| 302 | indexF, err := os.Create(siteDir + "/index.html") |
| 303 | check(err) |
| 304 | defer indexF.Close() |
| 305 | check(indexTmpl.Execute(indexF, examples)) |
| 306 | } |
| 307 | |
| 308 | func renderExamples(examples []*Example) { |
| 309 | if verbose() { |
no test coverage detected