chore(storage): common sorting for all servers

This commit is contained in:
Quentin McGaw
2022-06-06 01:57:44 +00:00
parent f53f0cfffd
commit 1216326867
48 changed files with 1319 additions and 1795 deletions

View File

@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"net"
"sort"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/qdm12/gluetun/internal/models"
@@ -72,7 +73,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) (
common.ErrNotEnoughServers, len(servers), minServers)
}
sortServers(servers)
sort.Sort(models.SortableServers(servers))
return servers, nil
}