chore(all): move sub-packages to internal/provider
This commit is contained in:
16
internal/provider/cyberghost/updater/sort.go
Normal file
16
internal/provider/cyberghost/updater/sort.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package cyberghost
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
)
|
||||
|
||||
func sortServers(servers []models.Server) {
|
||||
sort.Slice(servers, func(i, j int) bool {
|
||||
if servers[i].Country == servers[j].Country {
|
||||
return servers[i].Hostname < servers[j].Hostname
|
||||
}
|
||||
return servers[i].Country < servers[j].Country
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user