plugins.go: replaced stringsIndex()<0 with !strings.Contains()

This commit is contained in:
Celestino Amoroso 2024-07-07 16:17:48 +02:00
parent 9bc8e8ca05
commit 34874ef663

View File

@ -29,7 +29,7 @@ func pluginExists(name string) (exists bool) {
func makePluginName(name string) (decorated string) {
var template string
if execName, err := os.Executable(); err != nil || strings.Index(execName, "debug") < 0 {
if execName, err := os.Executable(); err != nil || !strings.Contains(execName, "debug") {
template = "expr-%s-plugin.so"
} else {
template = "expr-%s-plugin.so.debug"