From 566be709fdfffe2f509d270841c6b8d3b7ebf6c1 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 16 Jan 2023 12:14:03 +0100 Subject: [PATCH] Deprecation of package ioutil "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (SA1019)go-staticcheck https://github.com/go-critic/go-critic/issues/1019 --- controllers/nodefeaturediscovery_resources.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/nodefeaturediscovery_resources.go b/controllers/nodefeaturediscovery_resources.go index 2b3e4cb4..e092236d 100644 --- a/controllers/nodefeaturediscovery_resources.go +++ b/controllers/nodefeaturediscovery_resources.go @@ -18,7 +18,6 @@ package controllers import ( "context" - "io/ioutil" "os" "path/filepath" "regexp" @@ -80,7 +79,7 @@ func getAssetsFrom(path string) []assetsFromFile { // For each file in the 'files' list, read the file // and store its contents in 'manifests' for _, file := range files { - buffer, err := ioutil.ReadFile(file) + buffer, err := os.ReadFile(file) if err != nil { panic(err) }