diff options
author | Joe <rbo@gmx.us> | 2024-01-03 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-03 20:20:20 +0100 |
commit | 7e595f4ba400b32ece930de0847d994f6f2fbe24 (patch) | |
tree | 39ffae8e4930f687cc6ed48c9b5860624df985f7 /c_hardflip.go | |
parent | wip (diff) | |
download | hardflip-7e595f4ba400b32ece930de0847d994f6f2fbe24.tar.gz hardflip-7e595f4ba400b32ece930de0847d994f6f2fbe24.tar.bz2 hardflip-7e595f4ba400b32ece930de0847d994f6f2fbe24.tar.xz hardflip-7e595f4ba400b32ece930de0847d994f6f2fbe24.tar.zst hardflip-7e595f4ba400b32ece930de0847d994f6f2fbe24.zip |
unique id maybe?
Diffstat (limited to '')
-rw-r--r-- | c_hardflip.go | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index 4fd2b9f..f11cf19 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -51,7 +51,7 @@ package main -// import "fmt" +import "fmt" // the main data structure, holds up everything important type HardData struct { @@ -73,12 +73,24 @@ func main() { opts, data_dir, } - // for dir := ldirs.head; dir != nil ; dir = dir.next { - // fmt.Println(dir.ID, dir.Name) - // } + for dir := ldirs.head; dir != nil ; dir = dir.next { + spaces := "" + for i := 0; i < int(dir.Depth - 1) * 2; i++ { + spaces += " " + } + fmt.Println(dir.ID, spaces, dir.Name, "DIR") + for host := dir.lhost.head; host != nil; host = host.next { + spaces := "" + for i := 0; i < int(host.Parent.Depth - 1) * 2; i++ { + spaces += " " + } + spaces += " " + fmt.Println(host.ID, spaces, host.Name, "HOST") + } + } // for dir := ldirs.head; dir != nil ; dir = dir.next { // for host := dir.lhost.head; host != nil; host = host.next { - // fmt.Println(host.ID, host.Name) + // fmt.Println(host.ID, host.Name, "HOST") // } // } // for item := litems.head; item != nil ; item = item.next { @@ -90,5 +102,6 @@ func main() { // } // PERF: test performance over a large amount of hosts with litems + return i_ui(&data) } |