Improve panic message for empty connection

This commit is contained in:
Quentin McGaw
2021-01-31 18:42:58 +00:00
parent 3c7dc9b9ad
commit 982c50c756
3 changed files with 27 additions and 5 deletions

View File

@@ -13,6 +13,18 @@ type AllServers struct {
Windscribe WindscribeServers `json:"windscribe"`
}
func (a *AllServers) Count() int {
return len(a.Cyberghost.Servers) +
len(a.Mullvad.Servers) +
len(a.Nordvpn.Servers) +
len(a.Pia.Servers) +
len(a.Privado.Servers) +
len(a.Purevpn.Servers) +
len(a.Surfshark.Servers) +
len(a.Vyprvpn.Servers) +
len(a.Windscribe.Servers)
}
type CyberghostServers struct {
Version uint16 `json:"version"`
Timestamp int64 `json:"timestamp"`