summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-02 19:02:51 -0600
committerJeff Carr <[email protected]>2023-12-02 19:02:51 -0600
commit7880d9df6de1040258bea966f040e12be6205af1 (patch)
treebb0f3d74eb4e3b5094bfe78e936679efb940cacf /plugin.go
parent19e6ea76f3c09fe3a5d9a4d4caff7d14571f4ba5 (diff)
gocui plugin refactor to a *node binary tree
rename arg '--gui <toolkit>' add a cloudflare example fixes since go v1.21 didn't compile anymore due to argv order more place() changes recursive size computation gocui: Major refactor to use the *node binary tree gocui: refactor place() and size() gocui: better place() and spacing (tab, buttons, etc) gocui: better mouse click handling gocui: switch to using tk.gocuiSize & tk.size gocui: event handling cleanups gocui: add window labels work gocui: struct cleanups gocui: duplicate binary tree structs removed gocui: deprecate old children Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugin.go b/plugin.go
index d9f2bdd..42dc7cc 100644
--- a/plugin.go
+++ b/plugin.go
@@ -119,8 +119,15 @@ func searchPaths(name string) *aplug {
filename = "plugins/" + name + ".so"
pfile, err = me.resFS.ReadFile(filename)
if (err == nil) {
+ filename = "/tmp/" + name + ".so"
log(logError, "write out file here", name, filename, len(pfile))
- exit()
+ f, _ := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0600)
+ f.Write(pfile)
+ f.Close()
+ p := initToolkit(name, filename)
+ if (p != nil) {
+ return p
+ }
} else {
log(logError, filename, "was not embedded. Error:", err)
}