Files
gluetun/internal/provider/fastestvpn/updater/sort.go
2022-05-27 17:48:51 +00:00

17 lines
331 B
Go

package fastestvpn
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
})
}