aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2024-03-02 17:21:23 +0200
committerGravatar GitHub <noreply@github.com> 2024-03-02 16:21:23 +0100
commit7e1fb718543e4e00f807f081b63ba387570690f4 (patch)
tree1e0113099797442dffa8e77f4b1062c25d3de4be /http.go
parenttest: remove `//nolint:govet` comments (#1729) (diff)
downloadfasthttp-7e1fb718543e4e00f807f081b63ba387570690f4.tar.gz
fasthttp-7e1fb718543e4e00f807f081b63ba387570690f4.tar.bz2
fasthttp-7e1fb718543e4e00f807f081b63ba387570690f4.zip
Enable perfsprint linter; fix up lint issues (#1727)
Diffstat (limited to 'http.go')
-rw-r--r--http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.go b/http.go
index f54a183..5dd4e64 100644
--- a/http.go
+++ b/http.go
@@ -1633,7 +1633,7 @@ func (req *Request) Write(w *bufio.Writer) error {
_, err = w.Write(body)
} else if len(body) > 0 {
if req.secureErrorLogMessage {
- return fmt.Errorf("non-zero body for non-POST request")
+ return errors.New("non-zero body for non-POST request")
}
return fmt.Errorf("non-zero body for non-POST request. body=%q", body)
}
@@ -2379,7 +2379,7 @@ func readBodyChunked(r *bufio.Reader, maxBodySize int, dst []byte) ([]byte, erro
}
if !bytes.Equal(dst[len(dst)-strCRLFLen:], strCRLF) {
return dst, ErrBrokenChunk{
- error: fmt.Errorf("cannot find crlf at the end of chunk"),
+ error: errors.New("cannot find crlf at the end of chunk"),
}
}
dst = dst[:len(dst)-strCRLFLen]