diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2024-01-04 16:05:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 15:05:38 +0100 |
commit | 28615eba5594af29737938ae5cece50d7cba0a17 (patch) | |
tree | efb48c34b0d4372bdbbe4f89a06b7d3fb05baf75 /http_test.go | |
parent | chore: move cookie fuzz test to go 1.18 fuzzing (#1686) (diff) | |
download | fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.tar.gz fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.tar.bz2 fasthttp-28615eba5594af29737938ae5cece50d7cba0a17.zip |
Change empty string checks to be more idiomatic (#1684)
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 7b526cb..098990a 100644 --- a/http_test.go +++ b/http_test.go @@ -2214,7 +2214,7 @@ func testRequestSuccess(t *testing.T, method, requestURI, host, userAgent, body, if string(req1.Header.Method()) != expectedMethod { t.Fatalf("Unexpected method: %q. Expected %q", req1.Header.Method(), expectedMethod) } - if len(requestURI) == 0 { + if requestURI == "" { requestURI = "/" } if string(req1.Header.RequestURI()) != requestURI { @@ -2467,7 +2467,7 @@ func testRequestPostArgsError(t *testing.T, req *Request, s string) { t.Fatalf("Unexpected error when reading %q: %v", s, err) } ss := req.PostArgs().String() - if len(ss) != 0 { + if ss != "" { t.Fatalf("unexpected post args: %q. Expecting empty post args", ss) } } |