mirror of
https://github.com/micro-editor/micro.git
synced 2026-10-12 02:18:55 +00:00
plugins: Don't parse repo.json for built-in plugins
Built-in plugins don't have repo.json and never will, there is no point in checking if they have one, this only results in code duplication and dead code.
This commit is contained in:
@@ -247,16 +247,6 @@ func InitPlugins() {
|
||||
for _, f := range srcs {
|
||||
if strings.HasSuffix(f, ".lua") {
|
||||
p.Srcs = append(p.Srcs, assetFile(filepath.Join(plugdir, d, f)))
|
||||
} else if f == "repo.json" {
|
||||
data, err := rt.Asset(filepath.Join(plugdir, d, f))
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
p.Info, err = NewPluginInfo(data)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
p.Name = p.Info.Name
|
||||
}
|
||||
}
|
||||
if !isID(p.Name) || len(p.Srcs) <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user