18 lines
360 B
Go
18 lines
360 B
Go
package error
|
|
|
|
import (
|
|
"lishwist/templates"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
type pageProps struct {
|
|
Message string
|
|
}
|
|
|
|
func Page(w http.ResponseWriter, publicMessage string, status int, err error) {
|
|
log.Printf("%s --- %s\n", publicMessage, err)
|
|
templates.Execute(w, "error_page.gotmpl", pageProps{publicMessage})
|
|
http.Error(w, "", http.StatusInternalServerError)
|
|
}
|