From 7bee2d4540176e460ec5b36b393a7e77096ef1d3 Mon Sep 17 00:00:00 2001 From: Florian Baumann Date: Mon, 19 Feb 2024 16:08:19 +0100 Subject: [PATCH] Replace deprecated ioutil with io --- src/serra/scryfall.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serra/scryfall.go b/src/serra/scryfall.go index a9e040f..b08b23e 100644 --- a/src/serra/scryfall.go +++ b/src/serra/scryfall.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" + "io" "log" "net/http" "time" @@ -182,7 +182,7 @@ func fetchCard(setName, collectorNumber string) (*Card, error) { } //We Read the response body on the line below. - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { log.Fatalf("%s", err) return &Card{}, err @@ -220,7 +220,7 @@ func fetchSets() (*SetList, error) { } //We Read the response body on the line below. - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { log.Fatalln(err) return &SetList{}, err