rename IP node field

This commit is contained in:
William Banfield
2022-12-05 11:25:01 -05:00
parent 4dd0ff5621
commit ac539b1f3d
5 changed files with 21 additions and 17 deletions
+4
View File
@@ -7,6 +7,7 @@ import (
"net"
"os"
"path/filepath"
"time"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent"
@@ -14,10 +15,13 @@ import (
)
func Exec(cfg *ssh.ClientConfig, addr, cmd string) error {
start := time.Now()
c, err := ssh.Dial("tcp", addr, cfg)
if err != nil {
return err
}
after := time.Since(start)
fmt.Printf("Time: %s\n", after)
defer c.Close()
s, err := c.NewSession()
if err != nil {