mirror of
https://github.com/containers/gvisor-tap-vsock.git
synced 2025-10-11 03:31:14 +08:00
ioutil: Switch away from deprecated package
ioutil has been deprecated since golang 1.16. This commit uses the replacement methods from the os or io packages. This should fix some golangci-lint CI failures. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:

committed by
Anjan Nath

parent
89efd2bdb9
commit
8c72b59df3
@@ -2,8 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
@@ -27,7 +27,7 @@ func newClient(conn net.Conn, user string, key string) (*client, error) {
|
||||
}
|
||||
|
||||
func newConfig(user string, keyFile string) (*ssh.ClientConfig, error) {
|
||||
key, err := ioutil.ReadFile(keyFile)
|
||||
key, err := os.ReadFile(keyFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user