diff options
author | Joe <rbo@gmx.us> | 2023-12-26 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-26 20:20:20 +0100 |
commit | ec60852283708d48d9174a828d7ce649be6699da (patch) | |
tree | 4584e4addf31bf24cd50fac3eeee170f92524901 | |
parent | good id (diff) | |
download | hardflip-ec60852283708d48d9174a828d7ce649be6699da.tar.gz hardflip-ec60852283708d48d9174a828d7ce649be6699da.tar.bz2 hardflip-ec60852283708d48d9174a828d7ce649be6699da.tar.xz hardflip-ec60852283708d48d9174a828d7ce649be6699da.tar.zst hardflip-ec60852283708d48d9174a828d7ce649be6699da.zip |
must rewrite ui
-rw-r--r-- | c_exec.go | 6 | ||||
-rw-r--r-- | c_hardflip.go | 38 |
2 files changed, 20 insertions, 24 deletions
@@ -136,11 +136,11 @@ func c_format_cmd(id uint64, lhost *HostList) { if host == nil { c_die("host id not found", nil) } - if host.Type == 0 { + if host.Protocol == 0 { cmd_fmt = c_format_ssh(host) - } else if host.Type == 1 { + } else if host.Protocol == 1 { cmd_fmt = c_format_rdp(host) - } else if host.Type > 1 { + } else if host.Protocol > 1 { c_die("type not found", nil) } c_exec_cmd(cmd_fmt) diff --git a/c_hardflip.go b/c_hardflip.go index 5e95a13..6261783 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -47,14 +47,10 @@ package main -import ( - "fmt" -) - // the main data structure, holds up everything important type HardData struct { ldirs *DirsList - // ui HardUI + ui HardUI opts HardOpts data_dir string } @@ -64,23 +60,23 @@ func main() { ldirs := c_load_data_dir(data_dir) data := HardData{ ldirs, - // HardUI{}, + HardUI{}, HardOpts{true, true}, data_dir, } - dir := data.ldirs.head - for dir != nil { - spaces := "" - for i := 0; uint16(i) < dir.Depth; i++ { - spaces += " " - } - fmt.Println(spaces, dir.ID, dir.Name + "/") - host := dir.lhost.head - for host != nil { - fmt.Println(spaces, " ", host.ID, host.Filename) - host = host.next - } - dir = dir.next - } - // i_ui(&data) + // dir := data.ldirs.head + // for dir != nil { + // spaces := "" + // for i := 0; uint16(i) < dir.Depth; i++ { + // spaces += " " + // } + // fmt.Println(spaces, dir.ID, dir.Name + "/") + // host := dir.lhost.head + // for host != nil { + // fmt.Println(spaces, " ", host.ID, host.Filename) + // host = host.next + // } + // dir = dir.next + // } + i_ui(&data) } |