2022-02-13 01:21:25 +00:00
|
|
|
package validation
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/qdm12/gluetun/internal/constants"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// TODO remove in v4.
|
|
|
|
|
func SurfsharkRetroLocChoices() (choices []string) {
|
|
|
|
|
locationData := constants.SurfsharkLocationData()
|
|
|
|
|
choices = make([]string, 0, len(locationData))
|
|
|
|
|
seen := make(map[string]struct{}, len(locationData))
|
|
|
|
|
for _, data := range locationData {
|
|
|
|
|
if _, ok := seen[data.RetroLoc]; ok {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
seen[data.RetroLoc] = struct{}{}
|
2022-04-17 16:52:40 +00:00
|
|
|
choices = sortedInsert(choices, data.RetroLoc)
|
2022-02-13 01:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return choices
|
|
|
|
|
}
|