Plugin file name extension adapted to the host OS convention (.so on linux, .dll on windows, .dylib on Darwin/MacOS)
This commit is contained in:
+3
-3
@@ -31,11 +31,11 @@ func pluginExists(name string) (exists bool) {
|
||||
func makePluginName(name string) (decorated string) {
|
||||
var template string
|
||||
if execName, err := os.Executable(); err != nil || !strings.Contains(execName, "debug") {
|
||||
template = "expr-%s-plugin.so"
|
||||
template = "expr-%s-plugin%s"
|
||||
} else {
|
||||
template = "expr-%s-plugin.so.debug"
|
||||
template = "expr-%s-plugin%s.debug"
|
||||
}
|
||||
decorated = fmt.Sprintf(template, name)
|
||||
decorated = fmt.Sprintf(template, name, SHAREDLIBRARY_EXTENSION)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user