diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2024-03-02 17:21:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 16:21:23 +0100 |
commit | 7e1fb718543e4e00f807f081b63ba387570690f4 (patch) | |
tree | 1e0113099797442dffa8e77f4b1062c25d3de4be /http.go | |
parent | test: remove `//nolint:govet` comments (#1729) (diff) | |
download | fasthttp-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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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] |