diff options
| author | Jeff Carr <[email protected]> | 2023-04-28 08:14:51 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-28 08:14:51 -0500 |
| commit | 8b5f8fe42d9b161090ff91960050565959ac65dd (patch) | |
| tree | 8d49a71c5d7ad5183053fc1014c71264405c8282 /plugin.go | |
| parent | 3516434fbf56ada3724d4c07bf31bb71d0fe5469 (diff) | |
more embed handling
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
| -rw-r--r-- | plugin.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -115,6 +115,18 @@ func sendCallback(p *aplug, funcName string) func(chan toolkit.Action) { */ func searchPaths(name string) *aplug { var filename string + var pfile []byte + var err error + + // first try to load the embedded plugin file + filename = "plugins/" + name + ".so" + pfile, err = Config.resFS.ReadFile(filename) + if (err == nil) { + log(logError, "write out file here", name, filename, len(pfile)) + exit() + } else { + log(logError, filename, "was not embedded. Error:", err) + } // attempt to write out the file from the internal resource filename = "toolkit/" + name + ".so" |
