chore(updater): move updater packages to pkg/updaters/<name>

This commit is contained in:
Quentin McGaw
2026-04-23 03:47:57 +00:00
parent 5b01324d5f
commit 13503b0ae0
268 changed files with 1602 additions and 1026 deletions
+38
View File
@@ -0,0 +1,38 @@
package models
type SortableServers []Server
func (s SortableServers) Len() int {
return len(s)
}
func (s SortableServers) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
func (s SortableServers) Less(i, j int) bool {
a, b := s[i], s[j]
if a.Country == b.Country { //nolint:nestif
if a.Region == b.Region {
if a.City == b.City {
if a.ServerName == b.ServerName {
if a.Number == b.Number {
if a.Hostname == b.Hostname {
if a.ISP == b.ISP {
return a.VPN < b.VPN
}
return a.ISP < b.ISP
}
return a.Hostname < b.Hostname
}
return a.Number < b.Number
}
return a.ServerName < b.ServerName
}
return a.City < b.City
}
return a.Region < b.Region
}
return a.Country < b.Country
}