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

Commit

Permalink
chore: remove references to deprecated io/ioutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
menzerath committed Feb 17, 2021
1 parent e88bdf1 commit 4bc7107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions monstercat/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package monstercat
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"time"
Expand Down Expand Up @@ -71,7 +70,7 @@ func (client Client) DownloadRelease(release Release, downloadFormat DownloadFor
defer response.Body.Close()

if response.StatusCode != http.StatusOK {
message, err := ioutil.ReadAll(response.Body)
message, err := io.ReadAll(response.Body)
if err != nil {
return fmt.Errorf("http error %d", response.StatusCode)
}
Expand Down
4 changes: 2 additions & 2 deletions monstercat/release_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package monstercat
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
)

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

if response.StatusCode != http.StatusOK {
message, err := ioutil.ReadAll(response.Body)
message, err := io.ReadAll(response.Body)
if err != nil {
return releaseList, fmt.Errorf("http error %d", response.StatusCode)
}
Expand Down

0 comments on commit 4bc7107

Please sign in to comment.