diff options
| author | Jeff Carr <[email protected]> | 2025-10-13 12:44:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-13 12:44:12 -0500 |
| commit | 35ac3f03598447b436dae82fb779c1bf412f9188 (patch) | |
| tree | 9c44852de6bef5f883af16afbcc923a11014bb0d | |
| parent | d4b928f7bb8f66afc31a95fa4552b8fd8fba3712 (diff) | |
remove dep to fhelp
| -rw-r--r-- | gui.go | 82 | ||||
| -rw-r--r-- | interface.go | 2 |
2 files changed, 24 insertions, 60 deletions
@@ -1,75 +1,37 @@ package prep -// initializes logging and command line options +import ( + "go.wit.com/lib/cobol" + "go.wit.com/log" +) -/* -var argGui ArgsGui - - -// This struct can be used with the go-arg package. These -// are the generic default command line arguments for the 'GUI' package -type ArgsGui struct { - GuiPlugin string `arg:"--gui" help:"select the plugin (andlabs,gocui,etc)"` - GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"` -} - -// after go-args MustParse & user configuration -// the gui package can pull out the final settings and init() the GO Plugin GUI Toolkit -func postMustParse(s string) string { - switch s { - case "PluginHack": - case "VERBOSE": - if argGui.GuiVerbose == true { - return "true" - } - return "false" - case "DEFAULT": - if argGui.GuiPlugin != "" { - return argGui.GuiPlugin - } - return "gocui" - case "FILE": - return "someplugin" - default: - return "" - } - return "unknown" -} +// this has been deprecated +// moved to go.wit.com/lib/fhelp for now var prepGui *GuiPrep type GuiPrep struct { - rootn *gui.Node - hidden bool // don't update the toolkits when it's hidden - Auto func([]string) } func Gui() *GuiPrep { - if len(os.Args) > 1 && os.Args[1] == "--gui-check-plugin" { - gui.TestPluginAndExitNew(os.Args[2]) - os.Exit(0) - } - arg.Register(&argGui) - - prepGui = new(GuiPrep) - prepGui.rootn = gui.PreInit(postMustParse) - return prepGui + workInProgress() + return nil } func (g *GuiPrep) Start() error { - // me.myGui.InitEmbed(resources) - if pname, err := g.rootn.Default(); err != nil { - if !fhelp.BuildPlugin("gocui") { - log.Info("You can't run the forge GUI since the plugins did not build", pname) - return nil - } - if err := g.rootn.LoadToolkitNew("gocui"); err != nil { - log.Info("The plugins built, but still failed to load", pname) - return err - } - } else { - log.Info("The plugins built and loaded!", pname) - } + workInProgress() return nil } -*/ + +func workInProgress() { + s := "Mon Oct 13 10:48:16 CDT 2025" + log.Info(cobol.Time(s) + "") + log.Info(cobol.Time(s) + ": argv features are under active development") + log.Info(cobol.Time(s) + ":") + log.Info(cobol.Time(s) + ": argv Gui() support has been moved to go.wit.com/lib/fhelp") + log.Info(cobol.Time(s) + ": Change your code. Example code is here:") + log.Info(cobol.Time(s) + ": go.wit.com/apps/forge/argv.go") + log.Info(cobol.Time(s) + ": go.wit.com/apps/forge/main.go") + log.Info(cobol.Time(s) + ":") + panic("deprecated") +} diff --git a/interface.go b/interface.go index 8363a63..5873c0e 100644 --- a/interface.go +++ b/interface.go @@ -64,6 +64,8 @@ func findAppInfo(tmp interface{}) { if tmp, ok := tmp.(guiI); ok { myAuto.guiFunc = tmp.ArgvGui + } else { + panic("you must add this function to argv.go: (argv) func ArgvGui() error") } if tmp, ok := tmp.(autoFuncI); ok { |
