util/sshutil: minor linting / warning nits

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
master
Sebastiaan van Stijn 2021-12-01 17:01:15 +01:00
parent 2d63c3559a
commit 314bedc808
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ func addDefaultPort(hostport string, defaultPort int) string {
return hostport
}
// SshKeyScan scans a ssh server for the hostkey; server should be in the form hostname, or hostname:port
// SSHKeyScan scans a ssh server for the hostkey; server should be in the form hostname, or hostname:port
func SSHKeyScan(server string) (string, error) {
var key string
KeyScanCallback := func(hostport string, remote net.Addr, pubKey ssh.PublicKey) error {
@ -45,7 +45,7 @@ func SSHKeyScan(server string) (string, error) {
err = nil
}
if conn != nil {
conn.Close()
_ = conn.Close()
}
return key, err
}