Files
gluetun/internal/provider/protonvpn/updater/countries.go
2024-10-11 19:27:29 +00:00

16 lines
346 B
Go

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