mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-10 07:25:37 -05:00
18 lines
432 B
Go
18 lines
432 B
Go
package plugins
|
|
|
|
import (
|
|
"sort"
|
|
"strings"
|
|
)
|
|
|
|
func SortPluginInfoByFirstParty(pluginInfos []PluginInfo) {
|
|
sort.SliceStable(pluginInfos, func(i, j int) bool {
|
|
isFirstPartyI := strings.HasPrefix(pluginInfos[i].Repo, "https://github.com/AvengeMedia")
|
|
isFirstPartyJ := strings.HasPrefix(pluginInfos[j].Repo, "https://github.com/AvengeMedia")
|
|
if isFirstPartyI != isFirstPartyJ {
|
|
return isFirstPartyI
|
|
}
|
|
return false
|
|
})
|
|
}
|