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

@@ -42,9 +42,9 @@ func (s *Source) readOpenVPNProtocol() (tcp *bool, err error) {
case "":
return nil, nil //nolint:nilnil
case constants.UDP:
return boolPtr(false), nil
return ptrTo(false), nil
case constants.TCP:
return boolPtr(true), nil
return ptrTo(true), nil
default:
return nil, fmt.Errorf("environment variable %s: %w: %s",
envKey, ErrOpenVPNProtocolNotValid, protocol)