From fd320d9ec338f6f7127a72c36332025aa7bf4886 Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Tue, 17 Dec 2024 21:51:41 +0100 Subject: [PATCH] chore(): Migrates from the deprecated ioutil --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 23a9a77..4680458 100644 --- a/main.go +++ b/main.go @@ -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) }