File tree 9 files changed +14
-18
lines changed
9 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ package klauspost_snappy
30
30
31
31
import (
32
32
"io"
33
- "io/ioutil"
34
33
"sync"
35
34
36
35
snappylib "github.com/klauspost/compress/s2"
@@ -61,7 +60,7 @@ func PretendInit(clobbering bool) {
61
60
62
61
c := & compressor {}
63
62
c .poolCompressor .New = func () interface {} {
64
- w := snappylib .NewWriter (ioutil .Discard , snappylib .WriterSnappyCompat ())
63
+ w := snappylib .NewWriter (io .Discard , snappylib .WriterSnappyCompat ())
65
64
return & writer {Writer : w , pool : & c .poolCompressor }
66
65
}
67
66
encoding .RegisterCompressor (c )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ package klauspost_snappy
21
21
import (
22
22
"bytes"
23
23
"context"
24
- "io/ioutil "
24
+ "io"
25
25
"net"
26
26
"testing"
27
27
@@ -58,7 +58,7 @@ func TestRegisteredCompression(t *testing.T) {
58
58
59
59
r , err := comp .Decompress (buf )
60
60
require .NoError (t , err )
61
- expected , err := ioutil .ReadAll (r )
61
+ expected , err := io .ReadAll (r )
62
62
require .NoError (t , err )
63
63
64
64
assert .Equal (t , message , string (expected ))
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ package lz4
24
24
25
25
import (
26
26
"io"
27
- "io/ioutil"
28
27
"sync"
29
28
30
29
lz4lib "github.com/pierrec/lz4/v4"
@@ -55,7 +54,7 @@ func PretendInit(clobbering bool) {
55
54
56
55
c := & compressor {}
57
56
c .poolCompressor .New = func () interface {} {
58
- w := lz4lib .NewWriter (ioutil .Discard )
57
+ w := lz4lib .NewWriter (io .Discard )
59
58
return & writer {Writer : w , pool : & c .poolCompressor }
60
59
}
61
60
encoding .RegisterCompressor (c )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ package lz4
21
21
import (
22
22
"bytes"
23
23
"context"
24
- "io/ioutil "
24
+ "io"
25
25
"net"
26
26
"testing"
27
27
@@ -58,7 +58,7 @@ func TestRegisteredCompression(t *testing.T) {
58
58
59
59
r , err := comp .Decompress (buf )
60
60
require .NoError (t , err )
61
- expected , err := ioutil .ReadAll (r )
61
+ expected , err := io .ReadAll (r )
62
62
require .NoError (t , err )
63
63
64
64
assert .Equal (t , message , string (expected ))
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ package s2
18
18
19
19
import (
20
20
"io"
21
- "io/ioutil"
22
21
"sync"
23
22
24
23
"github.com/klauspost/compress/s2"
@@ -49,7 +48,7 @@ func PretendInit(clobbering bool) {
49
48
50
49
c := & compressor {}
51
50
c .poolCompressor .New = func () interface {} {
52
- w := s2 .NewWriter (ioutil .Discard , s2 .WriterConcurrency (1 ))
51
+ w := s2 .NewWriter (io .Discard , s2 .WriterConcurrency (1 ))
53
52
return & writer {Writer : w , pool : & c .poolCompressor }
54
53
}
55
54
encoding .RegisterCompressor (c )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ package s2
17
17
import (
18
18
"bytes"
19
19
"context"
20
- "io/ioutil "
20
+ "io"
21
21
"net"
22
22
"testing"
23
23
@@ -54,7 +54,7 @@ func TestRegisteredCompression(t *testing.T) {
54
54
55
55
r , err := comp .Decompress (buf )
56
56
require .NoError (t , err )
57
- expected , err := ioutil .ReadAll (r )
57
+ expected , err := io .ReadAll (r )
58
58
require .NoError (t , err )
59
59
60
60
assert .Equal (t , message , string (expected ))
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ package snappy
24
24
25
25
import (
26
26
"io"
27
- "io/ioutil"
28
27
"sync"
29
28
30
29
snappylib "github.com/golang/snappy"
@@ -55,7 +54,7 @@ func PretendInit(clobbering bool) {
55
54
56
55
c := & compressor {}
57
56
c .poolCompressor .New = func () interface {} {
58
- w := snappylib .NewBufferedWriter (ioutil .Discard )
57
+ w := snappylib .NewBufferedWriter (io .Discard )
59
58
return & writer {Writer : w , pool : & c .poolCompressor }
60
59
}
61
60
encoding .RegisterCompressor (c )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ package snappy
21
21
import (
22
22
"bytes"
23
23
"context"
24
- "io/ioutil "
24
+ "io"
25
25
"net"
26
26
"testing"
27
27
@@ -58,7 +58,7 @@ func TestRegisteredCompression(t *testing.T) {
58
58
59
59
r , err := comp .Decompress (buf )
60
60
require .NoError (t , err )
61
- expected , err := ioutil .ReadAll (r )
61
+ expected , err := io .ReadAll (r )
62
62
require .NoError (t , err )
63
63
64
64
assert .Equal (t , message , string (expected ))
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ package zstd
21
21
import (
22
22
"bytes"
23
23
"context"
24
- "io/ioutil "
24
+ "io"
25
25
"net"
26
26
"testing"
27
27
@@ -63,7 +63,7 @@ func TestRegisteredCompression(t *testing.T) {
63
63
64
64
r , err := comp .Decompress (buf )
65
65
require .NoError (t , err )
66
- expected , err := ioutil .ReadAll (r )
66
+ expected , err := io .ReadAll (r )
67
67
require .NoError (t , err )
68
68
69
69
assert .Equal (t , message , string (expected ))
You can’t perform that action at this time.
0 commit comments