mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
fix lint issue
This commit is contained in:
parent
da84be2352
commit
1bbb1b4a10
2 changed files with 2 additions and 2 deletions
|
@ -21,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))
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.RespWriter.Write([]byte(msg))
|
_, _ = ctx.RespWriter.Write([]byte(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
func errorMessage(statusCode int) string {
|
func errorMessage(statusCode int) string {
|
||||||
|
|
|
@ -39,7 +39,7 @@ func (c *Context) String(raw string, status ...int) {
|
||||||
code = status[0]
|
code = status[0]
|
||||||
}
|
}
|
||||||
c.RespWriter.WriteHeader(code)
|
c.RespWriter.WriteHeader(code)
|
||||||
c.RespWriter.Write([]byte(raw))
|
_, _ = c.RespWriter.Write([]byte(raw))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) IsMethod(m string) bool {
|
func (c *Context) IsMethod(m string) bool {
|
||||||
|
|
Loading…
Reference in a new issue