update func desc

This commit is contained in:
6543 2022-11-12 00:05:51 +01:00
parent 46a343c182
commit f635c21c64
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862

View file

@ -9,8 +9,8 @@ import (
"codeberg.org/codeberg/pages/server/context"
)
// ReturnErrorPage sets the response status code and writes NotFoundPage to the response body, with "%status" replaced
// with the provided status code.
// ReturnErrorPage sets the response status code and writes NotFoundPage to the response body,
// with "%status%" and %message% replaced with the provided statusCode and msg
func ReturnErrorPage(ctx *context.Context, msg string, statusCode int) {
ctx.RespWriter.Header().Set("Content-Type", "text/html; charset=utf-8")
ctx.RespWriter.WriteHeader(statusCode)