From 360002f785af6df4b03cdeda1a39b1c2bcb25f59 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 7 Jan 2024 18:50:36 -0600 Subject: misc updates Signed-off-by: Jeff Carr --- main.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index c3b2eac..d34f0ce 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "os" "time" "go.wit.com/log" @@ -17,6 +18,10 @@ func main() { // initialize a new GO GUI instance myGui = gui.New().Default() + if os.Getenv("DIGITALOCEAN_TOKEN") == "" { + log.Warn("your DIGITALOCEAN_TOKEN environment variable is not set") + } + // draw the main window cloudApp(myGui) @@ -25,15 +30,7 @@ func main() { myDo.Update() myDo.Show() - if debugger.ArgDebug() { - log.Sleep(2) - debugger.DebugWindow(myGui) - } - doUpdate() - // This is just a optional goroutine to watch that things are alive - gui.Watchdog() - gui.StandardExit() } func cloudApp(n *gui.Node) *gui.Node { @@ -69,6 +66,11 @@ func cloudApp(n *gui.Node) *gui.Node { }) grid.NewLabel("makes a new droplet") + grid.NewButton("gui debugger", func () { + debugger.DebugWindow(myGui) + }) + grid.NewLabel("make sure you have $ENV(DIGITALOCEAN_TOKEN} set to your API token") + return win } -- cgit v1.2.3