Files
gluetun/internal/updater/providers/privatevpn/countries.go
Quentin McGaw e8e7b83297 Maintenance: refactor servers updater code
- Require at least 80% of number of servers now to pass
- Each provider is in its own package with a common structure
- Unzip package with unzipper interface
- Openvpn package with extraction and download functions
2021-05-08 00:59:42 +00:00

15 lines
347 B
Go

package privatevpn
import "strings"
func codeToCountry(countryCode string, countryCodes map[string]string) (
country string, warning string) {
countryCode = strings.ToLower(countryCode)
country, ok := countryCodes[countryCode]
if !ok {
warning = "unknown country code: " + countryCode
country = countryCode
}
return country, warning
}