package web import "fmt" import "net/http" templ ErrorXXX(errCode int, reason, message string, r *http.Request) { {{ errText := http.StatusText(errCode) }} @base(errText, errText, "", "", r, errorXXXHead()) {

{ fmt.Sprint(errCode) }

{ errText } if reason != "" {

{ reason }

} if message != "" {

{ message }

}
if r.Referer() != "" {

Go back

} } } templ errorXXXHead() { }