chore(settings): use gosettings/sources/env functions

This commit is contained in:
Quentin McGaw
2023-05-30 13:02:10 +00:00
parent 2c30984a10
commit b87b2109b1
19 changed files with 67 additions and 169 deletions

View File

@@ -35,15 +35,15 @@ func (s *Source) readVPNServiceProvider(vpnType string) (vpnProviderPtr *string)
if value == "" {
if vpnType != vpn.Wireguard && env.Get("OPENVPN_CUSTOM_CONFIG") != "" {
// retro compatibility
return stringPtr(providers.Custom)
return ptrTo(providers.Custom)
}
return nil
}
value = strings.ToLower(value)
if value == "pia" { // retro compatibility
return stringPtr(providers.PrivateInternetAccess)
return ptrTo(providers.PrivateInternetAccess)
}
return stringPtr(value)
return ptrTo(value)
}