5
5
"encoding/hex"
6
6
"fmt"
7
7
"io"
8
- "io/ioutil"
9
8
)
10
9
11
10
// Enumeration values for supported compress Algorithms.
@@ -25,7 +24,7 @@ func CompareReaderEmpty(r io.Reader) error {
25
24
if r == nil {
26
25
return nil
27
26
}
28
- b , err := ioutil .ReadAll (r )
27
+ b , err := io .ReadAll (r )
29
28
if err != nil && err != io .EOF {
30
29
return fmt .Errorf ("unable to read from reader, %v" , err )
31
30
}
@@ -41,7 +40,7 @@ func CompareReaderBytes(r io.Reader, expect []byte) error {
41
40
if r == nil {
42
41
return fmt .Errorf ("missing body" )
43
42
}
44
- actual , err := ioutil .ReadAll (r )
43
+ actual , err := io .ReadAll (r )
45
44
if err != nil {
46
45
return fmt .Errorf ("unable to read, %v" , err )
47
46
}
@@ -60,7 +59,7 @@ func CompareJSONReaderBytes(r io.Reader, expect []byte) error {
60
59
if r == nil {
61
60
return fmt .Errorf ("missing body" )
62
61
}
63
- actual , err := ioutil .ReadAll (r )
62
+ actual , err := io .ReadAll (r )
64
63
if err != nil {
65
64
return fmt .Errorf ("unable to read, %v" , err )
66
65
}
@@ -77,7 +76,7 @@ func CompareXMLReaderBytes(r io.Reader, expect []byte) error {
77
76
return fmt .Errorf ("missing body" )
78
77
}
79
78
80
- actual , err := ioutil .ReadAll (r )
79
+ actual , err := io .ReadAll (r )
81
80
if err != nil {
82
81
return err
83
82
}
@@ -95,7 +94,7 @@ func CompareURLFormReaderBytes(r io.Reader, expect []byte) error {
95
94
if r == nil {
96
95
return fmt .Errorf ("missing body" )
97
96
}
98
- actual , err := ioutil .ReadAll (r )
97
+ actual , err := io .ReadAll (r )
99
98
if err != nil {
100
99
return fmt .Errorf ("unable to read, %v" , err )
101
100
}
0 commit comments