2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

feat: 测试插件

This commit is contained in:
耗子
2024-09-18 02:25:24 +08:00
parent 3193a15131
commit 615744e0cf
11 changed files with 646 additions and 272 deletions

View File

@@ -2,7 +2,9 @@
package pluginloader
import (
"cmp"
"fmt"
"slices"
"sync"
"github.com/go-chi/chi/v5"
@@ -31,6 +33,12 @@ func All() []*types.Plugin {
}
return true
})
// 排序
slices.SortFunc(list, func(a, b *types.Plugin) int {
return cmp.Compare(a.Order, b.Order)
})
return list
}