summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-09 03:16:43 -0500
committerJeff Carr <[email protected]>2025-09-09 03:16:43 -0500
commit1441f90e5a4032c7419e252cc12c6e406d996ed3 (patch)
tree847e329d350cf359777a66ea9046c8aab84198b9 /plugin.go
parente799a19b2cca024cb8effa0da7c97de580d7118c (diff)
smarter init()v0.25.0
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/plugin.go b/plugin.go
index e07d046..3f23223 100644
--- a/plugin.go
+++ b/plugin.go
@@ -255,21 +255,13 @@ func searchPaths(name string) *aplug {
// load module
// 1. open the shared object file to load the symbols
func initToolkit(name string, filename string) *aplug {
- /*
- if _, err := os.Stat(filename); err != nil {
- if os.IsNotExist(err) {
- log.Log(PLUG, "initToolkit() missing plugin", name, "as filename", filename)
- return nil
- }
- }
- log.Log(PLUG, "initToolkit() Found plugin", name, "as filename", filename)
-
- plug, err := plugin.Open(filename)
- */
+ // smart plugin test. remove all other code besides this
if err := checkPluginViaSubprocess(filename); err != nil {
log.Printf("initToolkit() subprocess load plugin failed: %v\n", err)
return nil
}
+ // the plugin will probably work. show the banner
+ colorBanner()
plug, err := checkPlug(filename)
if err != nil {