2022-02-13 01:21:25 +00:00
|
|
|
package validation
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/qdm12/gluetun/internal/models"
|
|
|
|
|
)
|
|
|
|
|
|
2022-04-16 22:25:36 +02:00
|
|
|
func FastestvpnCountriesChoices(servers []models.Server) (choices []string) {
|
2022-02-13 01:21:25 +00:00
|
|
|
choices = make([]string, len(servers))
|
|
|
|
|
for i := range servers {
|
|
|
|
|
choices[i] = servers[i].Country
|
|
|
|
|
}
|
|
|
|
|
return makeUnique(choices)
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-16 22:25:36 +02:00
|
|
|
func FastestvpnHostnameChoices(servers []models.Server) (choices []string) {
|
2022-02-13 01:21:25 +00:00
|
|
|
choices = make([]string, len(servers))
|
|
|
|
|
for i := range servers {
|
|
|
|
|
choices[i] = servers[i].Hostname
|
|
|
|
|
}
|
|
|
|
|
return makeUnique(choices)
|
|
|
|
|
}
|