Feature: filter by hostname for Mullvad servers

This commit is contained in:
Quentin McGaw
2021-05-08 19:17:36 +00:00
parent a34769ae02
commit 2ec2f45c82
11 changed files with 382 additions and 143 deletions

View File

@@ -11,18 +11,19 @@ import (
func Test_Stringify(t *testing.T) {
servers := []models.MullvadServer{{
Country: "webland",
City: "webcity",
ISP: "not nsa",
Owned: true,
IPs: []net.IP{{1, 1, 1, 1}},
IPsV6: []net.IP{{1, 1, 1, 1}},
Country: "webland",
City: "webcity",
Hostname: "hostname",
ISP: "not nsa",
Owned: true,
IPs: []net.IP{{1, 1, 1, 1}},
IPsV6: []net.IP{{1, 1, 1, 1}},
}}
//nolint:lll
expected := `
func MullvadServers() []models.MullvadServer {
return []models.MullvadServer{
{Country: "webland", City: "webcity", ISP: "not nsa", Owned: true, IPs: []net.IP{{1, 1, 1, 1}}, IPsV6: []net.IP{{1, 1, 1, 1}}},
{Country: "webland", City: "webcity", Hostname: "hostname", ISP: "not nsa", Owned: true, IPs: []net.IP{{1, 1, 1, 1}}, IPsV6: []net.IP{{1, 1, 1, 1}}},
}
}
`