Maintenance: refactor servers updater code
- Require at least 80% of number of servers now to pass - Each provider is in its own package with a common structure - Unzip package with unzipper interface - Openvpn package with extraction and download functions
This commit is contained in:
13
internal/updater/providers/surfshark/sort.go
Normal file
13
internal/updater/providers/surfshark/sort.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package surfshark
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
)
|
||||
|
||||
func sortServers(servers []models.SurfsharkServer) {
|
||||
sort.Slice(servers, func(i, j int) bool {
|
||||
return servers[i].Region < servers[j].Region
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user