mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
fix(lint): io/ioutil is deprecated
This commit is contained in:
parent
836fd2d711
commit
5525ed602f
@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
@ -410,7 +409,7 @@ func TestWrongFingerprint(t *testing.T) {
|
|||||||
func getHostPublicKeyFile(keypath string) (ssh.PublicKey, error) {
|
func getHostPublicKeyFile(keypath string) (ssh.PublicKey, error) {
|
||||||
var pubkey ssh.PublicKey
|
var pubkey ssh.PublicKey
|
||||||
var err error
|
var err error
|
||||||
buf, err := ioutil.ReadFile(keypath)
|
buf, err := os.ReadFile(keypath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user