diff options
author | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
commit | ad7e33a4520e23120417f9d4bc04d484b554381f (patch) | |
tree | 6fd25957d5d666931ac368cd18d4c3b2620a744b /c_hardflip.go | |
parent | this is gonna be long (diff) | |
download | hardflip-ad7e33a4520e23120417f9d4bc04d484b554381f.tar.gz hardflip-ad7e33a4520e23120417f9d4bc04d484b554381f.tar.bz2 hardflip-ad7e33a4520e23120417f9d4bc04d484b554381f.tar.xz hardflip-ad7e33a4520e23120417f9d4bc04d484b554381f.tar.zst hardflip-ad7e33a4520e23120417f9d4bc04d484b554381f.zip |
todolist
Diffstat (limited to '')
-rw-r--r-- | c_hardflip.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index b99b418..e6bdbe0 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_hardflip.go - * Thu Jan 04 15:37:01 2024 + * Fri Jan 05 14:41:26 2024 * Joe * * the main @@ -51,7 +51,7 @@ package main -// import "fmt" +import "fmt" type HardPtr interface { is_dir() bool @@ -94,7 +94,8 @@ func (data *HardData) sel_unique_id(id int) { } func main() { - // TODO: no ldirs just hosts raw hosts + // TODO: fill litems + // TODO: delete data.ptr | replace with litems data_dir := c_get_data_dir() opts := HardOpts{true, true, false} ldirs := c_load_data_dir(data_dir, opts) @@ -135,13 +136,13 @@ func main() { // fmt.Println(host.ID, host.Name, "HOST") // } // } - // for item := litems.head; item != nil ; item = item.next { - // if item.Dirs != nil { - // fmt.Println(item.ID, item.Dirs.Name) - // } else { - // fmt.Println(item.ID, item.Host.Name) - // } - // } + for item := litems.head; item != nil ; item = item.next { + if item.is_dir() == true { + fmt.Println(item.ID, item.Dirs.Name) + } else { + fmt.Println(item.ID, item.Host.Name) + } + } // PERF: test performance over a large amount of hosts with litems i_ui(&data) |