Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 4bc7107

Browse files
committed
chore: remove references to deprecated io/ioutil package
1 parent e88bdf1 commit 4bc7107

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

monstercat/release.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package monstercat
33
import (
44
"fmt"
55
"io"
6-
"io/ioutil"
76
"net/http"
87
"os"
98
"time"
@@ -71,7 +70,7 @@ func (client Client) DownloadRelease(release Release, downloadFormat DownloadFor
7170
defer response.Body.Close()
7271

7372
if response.StatusCode != http.StatusOK {
74-
message, err := ioutil.ReadAll(response.Body)
73+
message, err := io.ReadAll(response.Body)
7574
if err != nil {
7675
return fmt.Errorf("http error %d", response.StatusCode)
7776
}

monstercat/release_list.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package monstercat
33
import (
44
"encoding/json"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"net/http"
88
)
99

@@ -40,7 +40,7 @@ func (client Client) ReleaseListAtPosition(limit int, offset int) (ReleaseList,
4040
defer response.Body.Close()
4141

4242
if response.StatusCode != http.StatusOK {
43-
message, err := ioutil.ReadAll(response.Body)
43+
message, err := io.ReadAll(response.Body)
4444
if err != nil {
4545
return releaseList, fmt.Errorf("http error %d", response.StatusCode)
4646
}

0 commit comments

Comments
 (0)