From 7984a7e7073cae00a2d9dd5f37a32c3136ba14a4 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 20 Dec 2023 20:20:20 +0100 Subject: refactor --- c_hardflip.go | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'c_hardflip.go') diff --git a/c_hardflip.go b/c_hardflip.go index ca231f7..c3e871a 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_hardflip.go - * Wed Dec 20 10:50:24 2023 + * Wed Dec 20 16:34:51 2023 * Joe * * the main @@ -47,29 +47,22 @@ package main -import ( - // "os" - - "github.com/gdamore/tcell/v2" -) - -type Data struct { +// the main data structure, holds up everything important +type HardData struct { lhost *HostList // dirs *DirList - opts Opts - s tcell.Screen + ui HardUI + opts HardOpts data_dir string - list_start int } func main() { data_dir := c_get_data_dir() - data := Data{ + data := HardData{ c_load_data_dir(data_dir), - Opts{true, true}, - nil, + HardUI{}, + HardOpts{true, true}, data_dir, - 0, } i_ui(&data) } -- cgit v1.2.3