chore: OpenVPN user and password as nullable
- Username and password can be the empty string for custom provider
This commit is contained in:
@@ -25,18 +25,3 @@ func readSecretFileAsStringPtr(secretPathEnvKey, defaultSecretPath string) (
|
||||
}
|
||||
return files.ReadFromFile(path)
|
||||
}
|
||||
|
||||
func readSecretFileAsString(secretPathEnvKey, defaultSecretPath string) (
|
||||
s string, err error) {
|
||||
path := getCleanedEnv(secretPathEnvKey)
|
||||
if path == "" {
|
||||
path = defaultSecretPath
|
||||
}
|
||||
stringPtr, err := files.ReadFromFile(path)
|
||||
if err != nil {
|
||||
return "", err
|
||||
} else if stringPtr == nil {
|
||||
return "", nil
|
||||
}
|
||||
return *stringPtr, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user