From c099d658545476a39855e55bca8ef9c42c9f43a3 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 4 Jan 2024 20:20:20 +0100 Subject: mixed is good --- c_hardflip.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'c_hardflip.go') diff --git a/c_hardflip.go b/c_hardflip.go index c2270d8..6e33d98 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -51,7 +51,13 @@ package main -import "fmt" +// import "fmt" + +type HardPtr interface { + is_dir() bool + get_self_dirs() *DirsNode + get_self_host() *HostNode +} // the main data structure, holds up everything important type HardData struct { @@ -60,12 +66,9 @@ type HardData struct { ui HardUI opts HardOpts data_dir string + ptr HardPtr } -// type HardPtr interface { -// is_dir() bool -// } - func main() { data_dir := c_get_data_dir() opts := HardOpts{true, true, false} @@ -76,10 +79,9 @@ func main() { HardUI{}, opts, data_dir, + nil, } - - // var ptr HardPtr // for ptr = ldirs.head; ptr != nil ; ptr = ptr.next { // spaces := "" // for i := 0; i < int(ptr.Depth - 1) * 2; i++ { @@ -115,6 +117,5 @@ func main() { // } // PERF: test performance over a large amount of hosts with litems - return i_ui(&data) } -- cgit v1.2.3