aboutsummaryrefslogtreecommitdiff
path: root/stream_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 /stream_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 'stream_test.go')
-rw-r--r--stream_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/stream_test.go b/stream_test.go
index 2631e3d..f4dcb5a 100644
--- a/stream_test.go
+++ b/stream_test.go
@@ -4,7 +4,6 @@ import (
"bufio"
"fmt"
"io"
- "io/ioutil"
"testing"
"time"
)
@@ -19,7 +18,7 @@ func TestNewStreamReader(t *testing.T) {
close(ch)
})
- data, err := ioutil.ReadAll(r)
+ data, err := io.ReadAll(r)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
@@ -88,7 +87,7 @@ func TestStreamReaderClose(t *testing.T) {
// read trailing data
go func() {
- if _, err := ioutil.ReadAll(r); err != nil {
+ if _, err := io.ReadAll(r); err != nil {
ch <- fmt.Errorf("unexpected error when reading trailing data: %w", err)
return
}