From a9d1217db789981ba0dd3e57e4f4d721919be3f0 Mon Sep 17 00:00:00 2001 From: Logan Fick Date: Sat, 6 Jul 2024 11:35:48 -0400 Subject: [PATCH] Resolved use of deprecated package in directory cleanup function. --- utils/utils.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/utils.go b/utils/utils.go index ee2940bf7..c239fd5ca 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math/rand" "net/url" "os" @@ -309,7 +308,7 @@ func CleanupDirectory(path string) { if err := os.MkdirAll(path, 0o750); err != nil { log.Fatalf("Unable to create '%s'. Please check the ownership and permissions: %s\n", path, err) } - entries, err := ioutil.ReadDir(path) + entries, err := os.ReadDir(path) if err != nil { log.Fatalf("Unable to read contents of '%s'. Please check the ownership and permissions: %s\n", path, err) }