From 4a1a0bed4d34dfdbafefd03f1369cf5bc5c22a8b Mon Sep 17 00:00:00 2001 From: Matthew John Date: Mon, 27 May 2024 09:19:48 +0100 Subject: [PATCH] Replace use of deprecated io package with os Issue #315 --- lib/recent.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/recent.go b/lib/recent.go index 4f735b2d..641cd190 100644 --- a/lib/recent.go +++ b/lib/recent.go @@ -2,7 +2,6 @@ package lib import ( "encoding/json" - "io/ioutil" "os" "path/filepath" "strings" @@ -76,7 +75,7 @@ func getRecentFileData(installPath string) RecentFile { fileExist := CheckFileExist(recentFilePath) if fileExist { - content, err := ioutil.ReadFile(recentFilePath) + content, err := os.ReadFile(recentFilePath) if err != nil { logger.Warnf("Error opening recent versions file (%q): %v. Ignoring", recentFilePath, err) return outputRecent