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

@@ -14,7 +14,7 @@ func (s *Source) readPortForward() (
"PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING",
"PORT_FORWARDING",
})
portForwarding.Enabled, err = envToBoolPtr(key)
portForwarding.Enabled, err = env.BoolPtr(key)
if err != nil {
return portForwarding, fmt.Errorf("environment variable %s: %w", key, err)
}
@@ -25,7 +25,7 @@ func (s *Source) readPortForward() (
"PORT_FORWARDING_STATUS_FILE",
}, env.ForceLowercase(false))
if value != "" {
portForwarding.Filepath = stringPtr(value)
portForwarding.Filepath = ptrTo(value)
}
return portForwarding, nil