fix lint issue

This commit is contained in:
6543 2022-11-12 00:40:18 +01:00
parent da84be2352
commit 1bbb1b4a10
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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 {