diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2024-02-21 06:51:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 05:51:28 +0100 |
commit | 190204cf1a4f9999e2739d3825967df445d82d7c (patch) | |
tree | d1acd3796778b24edfd2677e52ed69a1ca3eae5c /http_test.go | |
parent | Remove unnecessary build tag go1.21 (#1721) (diff) | |
download | fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.gz fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.bz2 fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.zip |
Upgrade golangci-lint to v1.56.2; fix gocritic issues (#1722)
Diffstat (limited to 'http_test.go')
-rw-r--r-- | http_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http_test.go b/http_test.go index a82f23e..5e2ce54 100644 --- a/http_test.go +++ b/http_test.go @@ -1210,7 +1210,7 @@ func TestRequestReadGzippedBody(t *testing.T) { if r.Header.ContentLength() != len(body) { t.Fatalf("unexpected content-length: %d. Expecting %d", r.Header.ContentLength(), len(body)) } - if string(r.Body()) != string(body) { + if !bytes.Equal(r.Body(), body) { t.Fatalf("unexpected body: %q. Expecting %q", r.Body(), body) } @@ -1323,7 +1323,7 @@ func TestRequestContinueReadBodyDisablePrereadMultipartForm(t *testing.T) { t.Fatalf("The multipartForm of the Request must be nil") } - if string(formData) != string(r.Body()) { + if !bytes.Equal(formData, r.Body()) { t.Fatalf("The body given must equal the body in the Request") } } |