From d4f26435e8f4b79740710e5bb2d1363e8b726884 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Sat, 19 Aug 2023 15:38:52 -0400 Subject: [PATCH] Remplacer deprecated ioutil.ReadAll -> io.ReadAll --- api/api.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/api.go b/api/api.go index 419ad41..dd8c92a 100644 --- a/api/api.go +++ b/api/api.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "mime/multipart" "net/http" "net/url" @@ -110,7 +109,7 @@ func (a *API) Call(method, route string) ([]byte, error) { defer response.Body.Close() - body, err := ioutil.ReadAll(response.Body) + body, err := io.ReadAll(response.Body) if err != nil { return nil, err } @@ -138,7 +137,7 @@ func (a *API) Call(method, route string) ([]byte, error) { defer resp.Body.Close() // Read Response Body - respBody, err := ioutil.ReadAll(resp.Body) + respBody, err := io.ReadAll(resp.Body) if err != nil { return nil, err }