diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 03:16:43 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 03:16:43 -0500 |
| commit | 1441f90e5a4032c7419e252cc12c6e406d996ed3 (patch) | |
| tree | 847e329d350cf359777a66ea9046c8aab84198b9 /plugin.go | |
| parent | e799a19b2cca024cb8effa0da7c97de580d7118c (diff) | |
smarter init()v0.25.0
Diffstat (limited to 'plugin.go')
| -rw-r--r-- | plugin.go | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -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 { |
