simplify some stuff

This commit is contained in:
Henrique Dias
2016-03-12 09:52:04 +00:00
parent 3301b60485
commit d41e4cc047
9 changed files with 33 additions and 54 deletions

22
hugo.go
View File

@@ -1,6 +1,6 @@
//go:generate go get github.com/jteeuwen/go-bindata
//go:generate go install github.com/jteeuwen/go-bindata/go-bindata
//go:generate go-bindata -debug -prefix assets/ -pkg assets -o routes/assets/assets.go assets/templates/ assets/public/...
//go:generate go-bindata -prefix assets/ -pkg assets -o routes/assets/assets.go assets/templates/ assets/public/...
// Package hugo makes the bridge between the static website generator Hugo
// and the webserver Caddy, also providing an administrative user interface.
@@ -143,26 +143,6 @@ func (h CaddyHugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
code, err = git.ServeHTTP(w, r, h.Config)
}
/* if err != nil {
log.Panic(err)
} */
/*
// Create the functions map, then the template, check for erros and
// execute the template if there aren't errors
functions := template.FuncMap{
"Defined": utils.Defined,
}
switch code {
case 404:
tpl, _ := utils.GetTemplate(r, functions, "404")
tpl.Execute(w, nil)
code = 200
err = nil
} */
return code, err
}