changed import conventions for plugin names: expr-<scoped-name>; scoped-name = <scope>-<name>
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
github.com/yqylovy/goimportdot v0.0.0-20170519021755-eb181a7eeabe h1:bWYrKmmfv37uNgXTdwkLSKYiYPJ1yfWmjBnvtMyAYzk=
|
||||
github.com/yqylovy/goimportdot v0.0.0-20170519021755-eb181a7eeabe/go.mod h1:alTKUpAJ/zbp17qvZwcFNwzufrb5DljMDY4mgJlIHao=
|
||||
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d h1:0olWaB5pg3+oychR51GUVCEsGkeCU/2JxjBgIo4f3M0=
|
||||
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
|
||||
|
||||
+7
-6
@@ -89,16 +89,17 @@ func searchAmongPath(filename string, dirList []string) (filePath string) {
|
||||
if dir, err = util.ExpandPath(dir); err != nil {
|
||||
continue
|
||||
}
|
||||
if fullPath := path.Join(dir, filename); isFile(fullPath) {
|
||||
fullPath := path.Join(dir, filename)
|
||||
if isFile(fullPath) {
|
||||
filePath = fullPath
|
||||
break
|
||||
}
|
||||
|
||||
subdir := strings.TrimSuffix(filename, suffix)
|
||||
if fullPath := path.Join(dir, subdir, filename); isFile(fullPath) {
|
||||
filePath = fullPath
|
||||
break
|
||||
}
|
||||
// subdir := strings.TrimSuffix(filename, suffix)
|
||||
// if fullPath := path.Join(dir, subdir, filename); isFile(fullPath) {
|
||||
// filePath = fullPath
|
||||
// break
|
||||
// }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,9 +33,9 @@ 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%s"
|
||||
template = "expr-%s%s"
|
||||
} else {
|
||||
template = "expr-%s-plugin%s.debug"
|
||||
template = "expr-%s%s.debug"
|
||||
}
|
||||
decorated = fmt.Sprintf(template, name, SHAREDLIBRARY_EXTENSION)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user