From 9d4d8c6779a1dc71d3c1678f3420b9e01e99f888 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 20 Nov 2022 13:57:39 +0100 Subject: [PATCH] multiroot: replace uses of deprecated io/ioutil Signed-off-by: Sebastiaan van Stijn --- multiroot/config/config.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/multiroot/config/config.go b/multiroot/config/config.go index db9f7d381..9b89eabd2 100644 --- a/multiroot/config/config.go +++ b/multiroot/config/config.go @@ -7,7 +7,6 @@ import ( "crypto/x509" "errors" "fmt" - "io/ioutil" "net" "net/url" "os" @@ -131,7 +130,7 @@ func LoadRoot(cfg map[string]string) (*Root, error) { return nil, err } - in, err := ioutil.ReadFile(certPath) + in, err := os.ReadFile(certPath) if err != nil { return nil, err } @@ -182,7 +181,7 @@ func parsePrivateKeySpec(spec string, cfg map[string]string) (crypto.Signer, err // stored in the Path field. log.Debug("loading private key file", specURL.Path) path := filepath.Join(specURL.Host, specURL.Path) - in, err := ioutil.ReadFile(path) + in, err := os.ReadFile(path) if err != nil { return nil, err } @@ -202,7 +201,7 @@ func parsePrivateKeySpec(spec string, cfg map[string]string) (crypto.Signer, err case "rofile": log.Warning("Red October support is currently experimental") path := filepath.Join(specURL.Host, specURL.Path) - in, err := ioutil.ReadFile(path) + in, err := os.ReadFile(path) if err != nil { return nil, err }