Update go version, modules and remove ioutil

This commit is contained in:
Ricardo Katz 2021-08-06 11:18:17 -03:00
parent 6f0401fc73
commit d226d831bd
31 changed files with 576 additions and 288 deletions

View file

@ -19,7 +19,7 @@ package file
import (
"crypto/sha1" // #nosec
"encoding/hex"
"io/ioutil"
"os"
"k8s.io/klog/v2"
)
@ -27,7 +27,7 @@ import (
// SHA1 returns the SHA1 of a file.
func SHA1(filename string) string {
hasher := sha1.New() // #nosec
s, err := ioutil.ReadFile(filename)
s, err := os.ReadFile(filename)
if err != nil {
klog.ErrorS(err, "Error reading file", "path", filename)
return ""