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()), }) }