chore(updater): shared not enough servers error
This commit is contained in:
@@ -10,12 +10,12 @@ import (
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/provider/common"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrParseIP = errors.New("cannot parse IP address")
|
||||
ErrNotIPv4 = errors.New("IP address is not IPv4")
|
||||
ErrNotEnoughServers = errors.New("not enough servers found")
|
||||
ErrParseIP = errors.New("cannot parse IP address")
|
||||
ErrNotIPv4 = errors.New("IP address is not IPv4")
|
||||
)
|
||||
|
||||
func (u *Updater) GetServers(ctx context.Context, minServers int) (
|
||||
@@ -57,7 +57,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) (
|
||||
|
||||
if len(servers) < minServers {
|
||||
return nil, fmt.Errorf("%w: %d and expected at least %d",
|
||||
ErrNotEnoughServers, len(servers), minServers)
|
||||
common.ErrNotEnoughServers, len(servers), minServers)
|
||||
}
|
||||
|
||||
sortServers(servers)
|
||||
|
||||
Reference in New Issue
Block a user