From cc7a1b0bdc69335132a022111c759931db6d1566 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 28 Nov 2024 18:36:00 -0600 Subject: [PATCH] compiles. kinda runs --- Makefile | 1 + init.go | 2 +- structs.go | 2 +- testGui/main.go | 9 ++++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1abeb4f..126787b 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ all: goimports: goimports -w *.go + make -C testGui/ goimports redomod: rm -f go.* diff --git a/init.go b/init.go index da30a53..a5e081d 100644 --- a/init.go +++ b/init.go @@ -1,8 +1,8 @@ package repolist import ( - "go.wit.com/lib/protobuf/forgepb" "go.wit.com/gui" + "go.wit.com/lib/protobuf/forgepb" "go.wit.com/log" ) diff --git a/structs.go b/structs.go index 4817831..5b04899 100644 --- a/structs.go +++ b/structs.go @@ -24,7 +24,7 @@ type RepoList struct { // the main window and box mainWindow *gui.Node - mainbox *gui.Node + mainbox *gui.Node onlyMe bool goSrcPwd string diff --git a/testGui/main.go b/testGui/main.go index f372bc1..c6880c1 100644 --- a/testGui/main.go +++ b/testGui/main.go @@ -8,6 +8,7 @@ import ( "go.wit.com/gui" "go.wit.com/lib/gui/repolist" + "go.wit.com/lib/protobuf/forgepb" ) // sent via -ldflags @@ -18,7 +19,13 @@ func main() { me = new(autoType) // load the ~/.config/forge/ config - me.forge.Init() + me.forge = forgepb.Init() + if me.forge == nil { + panic("damn it, forge is nil") + } + if me.forge.Config == nil { + panic("damn it config") + } me.forge.ConfigPrintTable() // setup the GUI