MCPcopy
hub / github.com/gobyexample-cn/gobyexample / render404

Function render404

tools/generate.go:323–334  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321}
322
323func render404() {
324 if verbose() {
325 fmt.Println("Rendering 404")
326 }
327 tmpl := template.New("404")
328 template.Must(tmpl.Parse(mustReadFile("templates/footer.tmpl")))
329 template.Must(tmpl.Parse(mustReadFile("templates/404.tmpl")))
330 file, err := os.Create(siteDir + "/404.html")
331 check(err)
332 defer file.Close()
333 check(tmpl.Execute(file, ""))
334}
335
336func main() {
337 if len(os.Args) > 1 {

Callers 1

mainFunction · 0.85

Calls 3

verboseFunction · 0.85
mustReadFileFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected