Files
gluetun/internal/provider/protonvpn/updater/countries.go
2022-05-27 17:48:51 +00:00

15 lines
346 B
Go

package protonvpn
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
}