mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
nit
This commit is contained in:
parent
f635c21c64
commit
b759aaf673
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
package html
|
package html
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -22,7 +21,7 @@ func ReturnErrorPage(ctx *context.Context, msg string, statusCode int) {
|
||||||
msg = strings.ReplaceAll(strings.ReplaceAll(ErrorPage, "%message%", msg), "%status%", http.StatusText(statusCode))
|
msg = strings.ReplaceAll(strings.ReplaceAll(ErrorPage, "%message%", msg), "%status%", http.StatusText(statusCode))
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _ = io.Copy(ctx.RespWriter, strings.NewReader(msg))
|
ctx.RespWriter.Write([]byte(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
func errorMessage(statusCode int) string {
|
func errorMessage(statusCode int) string {
|
||||||
|
|
Loading…
Reference in a new issue