aboutsummaryrefslogtreecommitdiff
path: root/client_timing_test.go
diff options
context:
space:
mode:
authorGravatar Aoang <aoang@x2oe.com> 2022-09-16 03:28:25 +0800
committerGravatar GitHub <noreply@github.com> 2022-09-15 22:28:25 +0300
commita696949f6c1b7eec6d6529f8e93612e65d0f5ec2 (patch)
tree02ec801ab0c707cfdee13991926d83ac2ceaaece /client_timing_test.go
parentImprove isTLSAlready check (diff)
downloadfasthttp-a696949f6c1b7eec6d6529f8e93612e65d0f5ec2.tar.gz
fasthttp-a696949f6c1b7eec6d6529f8e93612e65d0f5ec2.tar.bz2
fasthttp-a696949f6c1b7eec6d6529f8e93612e65d0f5ec2.zip
Deprecate Go 1.15 (#1379)
* Dropping support for 1.15. * Replaces Go 1.16 Deprecated functions * Update test build flag * Fix import sort and comment * Update github.com/klauspost/compress to v1.15.9 https://github.com/klauspost/compress improved performance and changed Minimum version is 1.16, this should be the final supported release for Go 1.16 (https://github.com/klauspost/compress/commit/6d0019a95afa3221f7522d1f2eed0033b5e79470) .
Diffstat (limited to 'client_timing_test.go')
-rw-r--r--client_timing_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/client_timing_test.go b/client_timing_test.go
index ac631ca..0755155 100644
--- a/client_timing_test.go
+++ b/client_timing_test.go
@@ -3,7 +3,7 @@ package fasthttp
import (
"bytes"
"fmt"
- "io/ioutil"
+ "io"
"net"
"net/http"
"runtime"
@@ -169,7 +169,7 @@ func BenchmarkNetHTTPClientDoFastServer(b *testing.B) {
if resp.StatusCode != http.StatusOK {
b.Fatalf("unexpected status code: %d", resp.StatusCode)
}
- respBody, err := ioutil.ReadAll(resp.Body)
+ respBody, err := io.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
b.Fatalf("unexpected error when reading response body: %v", err)
@@ -297,7 +297,7 @@ func benchmarkNetHTTPClientGetEndToEndTCP(b *testing.B, parallelism int) {
if resp.StatusCode != http.StatusOK {
b.Fatalf("unexpected status code: %d. Expecting %d", resp.StatusCode, http.StatusOK)
}
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
b.Fatalf("unexpected error when reading response body: %v", err)
@@ -427,7 +427,7 @@ func benchmarkNetHTTPClientGetEndToEndInmemory(b *testing.B, parallelism int) {
if resp.StatusCode != http.StatusOK {
b.Fatalf("unexpected status code: %d. Expecting %d", resp.StatusCode, http.StatusOK)
}
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
b.Fatalf("unexpected error when reading response body: %v", err)
@@ -554,7 +554,7 @@ func benchmarkNetHTTPClientEndToEndBigResponseInmemory(b *testing.B, parallelism
if resp.StatusCode != http.StatusOK {
b.Fatalf("unexpected status code: %d. Expecting %d", resp.StatusCode, http.StatusOK)
}
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
b.Fatalf("unexpected error when reading response body: %v", err)