chore(): Migrates from the deprecated ioutil
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Elia el Lazkani 2024-12-17 21:51:41 +01:00
parent 6dbc5784df
commit fd320d9ec3

View file

@ -3,7 +3,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
@ -15,7 +14,7 @@ import (
)
// VERSION The version release
const VERSION = "0.1.4"
const VERSION = "0.1.5"
// AUTHOR The author name
const AUTHOR = "Elia el Lazkani"
@ -72,7 +71,7 @@ func (w weather) get(req *http.Request, download bool) {
// `weather` method to print the weather
func (w weather) print(resp *http.Response) {
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading body. ", err)
}