Remove deprecated ioutil

This commit is contained in:
Romain de Laage 2021-03-22 09:15:25 +01:00
parent 8400a8521b
commit d739497e8c
Signed by: rdelaage
GPG Key ID: 534845FADDF0C329
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
package main
import (
"io/ioutil"
"io"
"log"
"net/http"
"encoding/json"
@ -42,7 +42,7 @@ func getArticles(endpoint, forB64 string) []Article {
log.Fatalln("Error when fetching articles, server returned " + resp.Status)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatalln(err)
}