21 lines
486 B
Go
21 lines
486 B
Go
|
package handlers
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
"text/template"
|
||
|
|
||
|
"git.espin.casa/albert/cml04-falcon-ui/storage"
|
||
|
"github.com/julienschmidt/httprouter"
|
||
|
)
|
||
|
|
||
|
func CoHandler(storage storage.Storager) httprouter.Handle {
|
||
|
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||
|
t, _ := template.ParseFiles("templates/base.html", "templates/co.html")
|
||
|
err := t.Execute(w, nil)
|
||
|
if err != nil {
|
||
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||
|
return
|
||
|
}
|
||
|
}
|
||
|
}
|