mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 18:27:13 +08:00
feat: 测试插件
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user