lens @ a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61

 1package ext
 2
 3import (
 4	"fmt"
 5	"net/http"
 6
 7	"git.sr.ht/~gabrielgio/img/templates"
 8)
 9
10func NotFound(w http.ResponseWriter, r *http.Request) {
11	templates.WritePageTemplate(w, &templates.ErrorPage{
12		Err: "Not Found",
13	})
14}
15
16func InternalServerError(w http.ResponseWriter, err error) {
17	w.WriteHeader(http.StatusInternalServerError)
18	templates.WritePageTemplate(w, &templates.ErrorPage{
19		Err: fmt.Sprintf("Internal Server Error:\n%s", err.Error()),
20	})
21}