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