Maintenance: sort alphabetically providers in code

This commit is contained in:
Quentin McGaw
2021-02-26 12:58:58 +00:00
parent e3a157bfe1
commit 1fd3ee7149
12 changed files with 149 additions and 145 deletions

View File

@@ -21,6 +21,11 @@ func GetAllServers() (allServers models.AllServers) {
Timestamp: 1611096594,
Servers: NordvpnServers(),
},
Privado: models.PrivadoServers{
Version: 2,
Timestamp: 1612031135,
Servers: PrivadoServers(),
},
Pia: models.PiaServers{
Version: 4,
Timestamp: 1613480675,
@@ -31,11 +36,6 @@ func GetAllServers() (allServers models.AllServers) {
Timestamp: 1612031135,
Servers: PurevpnServers(),
},
Privado: models.PrivadoServers{
Version: 2,
Timestamp: 1612031135,
Servers: PrivadoServers(),
},
Surfshark: models.SurfsharkServers{
Version: 1,
Timestamp: 1612031135,

View File

@@ -49,16 +49,16 @@ func Test_versions(t *testing.T) {
version: allServers.Nordvpn.Version,
digest: "040de8d0",
},
"Private Internet Access": {
model: models.PIAServer{},
version: allServers.Pia.Version,
digest: "3e6066ec",
},
"Privado": {
model: models.PrivadoServer{},
version: allServers.Privado.Version,
digest: "1d5aeb23",
},
"Private Internet Access": {
model: models.PIAServer{},
version: allServers.Pia.Version,
digest: "3e6066ec",
},
"Purevpn": {
model: models.PurevpnServer{},
version: allServers.Purevpn.Version,
@@ -135,6 +135,11 @@ func Test_timestamps(t *testing.T) {
timestamp: allServers.Nordvpn.Timestamp,
digest: "2296312c",
},
"Privado": {
servers: allServers.Privado.Servers,
timestamp: allServers.Privado.Timestamp,
digest: "2ac55360",
},
"Private Internet Access": {
servers: allServers.Pia.Servers,
timestamp: allServers.Pia.Timestamp,
@@ -145,11 +150,6 @@ func Test_timestamps(t *testing.T) {
timestamp: allServers.Purevpn.Timestamp,
digest: "cd19edf5",
},
"Privado": {
servers: allServers.Privado.Servers,
timestamp: allServers.Privado.Timestamp,
digest: "2ac55360",
},
"Surfshark": {
servers: allServers.Surfshark.Servers,
timestamp: allServers.Surfshark.Timestamp,

View File

@@ -1,26 +1,26 @@
package constants
const (
// PrivateInternetAccess is a VPN provider.
PrivateInternetAccess = "private internet access"
// Mullvad is a VPN provider.
Mullvad = "mullvad"
// Windscribe is a VPN provider.
Windscribe = "windscribe"
// Surfshark is a VPN provider.
Surfshark = "surfshark"
// Cyberghost is a VPN provider.
Cyberghost = "cyberghost"
// Vyprvpn is a VPN provider.
Vyprvpn = "vyprvpn"
// Mullvad is a VPN provider.
Mullvad = "mullvad"
// NordVPN is a VPN provider.
Nordvpn = "nordvpn"
// PureVPN is a VPN provider.
Purevpn = "purevpn"
// Privado is a VPN provider.
Privado = "privado"
// PrivateInternetAccess is a VPN provider.
PrivateInternetAccess = "private internet access"
// PureVPN is a VPN provider.
Purevpn = "purevpn"
// Surfshark is a VPN provider.
Surfshark = "surfshark"
// Torguard is a VPN provider.
Torguard = "torguard"
// Vyprvpn is a VPN provider.
Vyprvpn = "vyprvpn"
// Windscribe is a VPN provider.
Windscribe = "windscribe"
)
const (