From 144dcbbb0fc0d769a97287f249614fd486a78249 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Sat, 19 Feb 2022 17:58:57 +0100 Subject: [PATCH] Remove deprecated ioutil usages --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index bce87e8..b3f0622 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -88,7 +87,7 @@ func main() { func matchingManifests(path string, term string) (res []match) { term = strings.ToLower(term) - files, err := ioutil.ReadDir(path) + files, err := os.ReadDir(path) check(err) var parser fastjson.Parser @@ -102,7 +101,7 @@ func matchingManifests(path string, term string) (res []match) { } // parse relevant data from manifest - raw, err := ioutil.ReadFile(path + "\\" + name) + raw, err := os.ReadFile(path + "\\" + name) check(err) result, _ := parser.ParseBytes(raw)