refactor(fun/clbot): s#io/ioutil#os
Change-Id: I046edc62aa233fa9fa67ef95df86f6c1bca21538 Reviewed-on: https://cl.snix.dev/c/snix/+/30223 Tested-by: besadii Autosubmit: Florian Klink <flokli@flokli.de> Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
This commit is contained in:
parent
7ba2cd9f52
commit
b9a1b0e927
1 changed files with 1 additions and 2 deletions
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
|
@ -75,7 +74,7 @@ func mustFixedHostKey(f string) ssh.HostKeyCallback {
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustPrivateKey(p string) ssh.AuthMethod {
|
func mustPrivateKey(p string) ssh.AuthMethod {
|
||||||
pkBytes, err := ioutil.ReadFile(p)
|
pkBytes, err := os.ReadFile(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Exitf("reading SSH private key from %q: %v", p, err)
|
log.Exitf("reading SSH private key from %q: %v", p, err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue