Remove deprecated ioutil
This commit is contained in:
parent
8400a8521b
commit
d739497e8c
4
assos.go
4
assos.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue