From fe9990c570fd1d7e55e6e0af280e7959d4bc5187 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 15 Dec 2023 20:20:20 +0100 Subject: you rock --- c_josh.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'c_josh.go') diff --git a/c_josh.go b/c_josh.go index 2cd6c01..61ee0bb 100644 --- a/c_josh.go +++ b/c_josh.go @@ -61,7 +61,10 @@ func display_servers(lhost *HostList) { curr = curr.next } fmt.Println() - curr = lhost.head + curr = lhost.sel(2) + if curr == nil { + c_die("host id not found", nil) + } fmt.Println ("ssh", "-i", curr.Priv, "-p", strconv.Itoa(int(curr.Port)), curr.User + "@" + curr.Host) cmd := exec.Command("ssh", "-i", curr.Priv, "-p", strconv.Itoa(int(curr.Port)), curr.User + "@" + curr.Host) cmd.Stdin = os.Stdin -- cgit v1.2.3