From b410d0fd083ee89eed410cda2123a22cddcd3f44 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 6 Nov 2022 19:57:20 -0600 Subject: Implement a early AddButton() via a golang plugin pass a name to gocui.AddButton() cleaner plugin usage add the start to golang plugin plugin stuff in a single file added a button correctly andlabs/ui added a button via plugin to gocli hot diggity! trying to invoke a gocli plugin function from the andlabs ui load the plugin hide more debugging output turn off all output Signed-off-by: Jeff Carr --- toolkit/andlabs/structs.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'toolkit/andlabs/structs.go') diff --git a/toolkit/andlabs/structs.go b/toolkit/andlabs/structs.go index 374627c..9bba671 100644 --- a/toolkit/andlabs/structs.go +++ b/toolkit/andlabs/structs.go @@ -21,8 +21,10 @@ var DebugToolkit bool func setDefaultBehavior(s bool) { defaultBehavior = s if (defaultBehavior) { - log.Println("Setting this toolkit to use the default behavior.") - log.Println("This is the 'guessing' part as defined by the wit/gui 'Principles'. Refer to the docs.") + if (DebugToolkit) { + log.Println("Setting this toolkit to use the default behavior.") + log.Println("This is the 'guessing' part as defined by the wit/gui 'Principles'. Refer to the docs.") + } stretchy = false padded = true menubar = true -- cgit v1.2.3