From ff46232876da57297d6f8b46e311fcd0f659b5cf Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 18 Dec 2023 20:20:20 +0100 Subject: up --- c_exec.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'c_exec.go') diff --git a/c_exec.go b/c_exec.go index fc42957..8193068 100644 --- a/c_exec.go +++ b/c_exec.go @@ -101,7 +101,8 @@ func c_format_ssh(host *HostNode) []string { return cmd_fmt } -func c_format_rdp() { +func c_format_rdp(host *HostNode) []string { + return []string{""} } func c_format_cmd(id uint64, lhost *HostList) { @@ -114,21 +115,18 @@ func c_format_cmd(id uint64, lhost *HostList) { } if host.Type == 0 { cmd_fmt = c_format_ssh(host) + } else if host.Type == 1 { + cmd_fmt = c_format_rdp(host) + } else if host.Type > 1 { + c_die("type not found", nil) } c_exec_cmd(cmd_fmt) } -func c_display_servers(lhost *HostList) { - host := lhost.head - +func c_exec(id uint64, lhost *HostList) { if lhost.head == nil { fmt.Println("no hosts") return } - for host != nil { - fmt.Println(host.ID, host.Folder + host.Name) - host = host.next - } - fmt.Println() - c_format_cmd(4, lhost) + c_format_cmd(id, lhost) } -- cgit v1.2.3