replaced ioutil.ReadAll by io.ReadAll
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2022-11-02 17:16:58 +01:00
parent bdfac57763
commit c2f23b044e

View File

@ -3,7 +3,7 @@ package data
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io"
"net/http" "net/http"
"time" "time"
@ -33,7 +33,7 @@ func FetchData(c *config.Config, city string) (Data, error) {
defer r.Body.Close() defer r.Body.Close()
b, err := ioutil.ReadAll(r.Body) b, err := io.ReadAll(r.Body)
if err != nil { if err != nil {
return Data{}, err return Data{}, err
} }