Skip to content

Commit

Permalink
multiroot: replace uses of deprecated io/ioutil
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Nov 20, 2022
1 parent df5893e commit 9d4d8c6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions multiroot/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"crypto/x509"
"errors"
"fmt"
"io/ioutil"
"net"
"net/url"
"os"
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 9d4d8c6

Please sign in to comment.