Skip to content

Commit

Permalink
Remove deprecated ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Nov 11, 2022
1 parent 8c9cb3f commit 8479b16
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 44 deletions.
4 changes: 2 additions & 2 deletions config/http_config.go
Expand Up @@ -846,12 +846,12 @@ func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {

// readCertAndKey reads the cert and key files from the disk.
func readCertAndKey(certFile, keyFile string) ([]byte, []byte, error) {
certData, err := ioutil.ReadFile(certFile)
certData, err := os.ReadFile(certFile)
if err != nil {
return nil, nil, err
}

keyData, err := ioutil.ReadFile(keyFile)
keyData, err := os.ReadFile(keyFile)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 8479b16

Please sign in to comment.