Skip to content

Commit

Permalink
Merge pull request #219 from SputNikPlop/ioutil
Browse files Browse the repository at this point in the history
fix: deprecate ioutil
  • Loading branch information
nicklaw5 committed May 6, 2024
2 parents d4e4404 + 26e31ca commit 3b46324
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/eventsub_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type eventSubNotification struct {
}

func eventsubFollow(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
log.Println(err)
return
Expand Down
4 changes: 2 additions & 2 deletions helix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"reflect"
Expand Down Expand Up @@ -364,7 +364,7 @@ func (c *Client) doRequest(req *http.Request, resp *Response) error {

setResponseStatusCode(resp, "StatusCode", response.StatusCode)

bodyBytes, err := ioutil.ReadAll(response.Body)
bodyBytes, err := io.ReadAll(response.Body)
if err != nil {
return err
}
Expand Down

0 comments on commit 3b46324

Please sign in to comment.