chore: remove refs to deprecated io/ioutil (#987)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu
2023-10-31 22:35:13 +08:00
committed by GitHub
parent 777eb96aea
commit 276978377a
14 changed files with 50 additions and 63 deletions

3
ssh.go
View File

@@ -6,7 +6,6 @@ import (
"errors"
"flag"
"fmt"
"io/ioutil"
"net"
"os"
"reflect"
@@ -96,7 +95,7 @@ func configSSH(l *logrus.Logger, ssh *sshd.SSHServer, c *config.C) (func(), erro
return nil, fmt.Errorf("sshd.host_key must be provided")
}
hostKeyBytes, err := ioutil.ReadFile(hostKeyFile)
hostKeyBytes, err := os.ReadFile(hostKeyFile)
if err != nil {
return nil, fmt.Errorf("error while loading sshd.host_key file: %s", err)
}