Skip to content

Commit 9335f74

Browse files
testwillqustavo
authored andcommitted
chore: remove refs to deprecated io/ioutil
1 parent f5ec1a2 commit 9335f74

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dump.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7-
"io/ioutil"
7+
"io"
88
"net/http"
99
"regexp"
1010
"sort"
@@ -30,7 +30,7 @@ func withColor(color int, text string) string {
3030
}
3131

3232
func writeBody(buf *bytes.Buffer, req *http.Request) error {
33-
body, err := ioutil.ReadAll(req.Body)
33+
body, err := io.ReadAll(req.Body)
3434
if err != nil {
3535
return err
3636
}

response.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"io"
8-
"io/ioutil"
98
"net/http"
109
"os"
1110
"sort"
@@ -53,7 +52,7 @@ func (body *Body) Payload() []byte {
5352
}
5453

5554
// XXX: Handle this error
56-
bytes, _ := ioutil.ReadAll(body.File)
55+
bytes, _ := io.ReadAll(body.File)
5756
body.File.Seek(0, 0)
5857
return bytes
5958
}

0 commit comments

Comments
 (0)