You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
simplify some stuff
This commit is contained in:
22
hugo.go
22
hugo.go
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user