lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 070c167bfa20da610d1df8b518b22667a8e4cd39
parent 3572500b3b618c0d34e893a832f2e30dbbec6497
Author: Sean Enck <sean@ttypty.com>
Date:   Sun, 11 Aug 2024 13:21:11 -0400

whenUnset and default value are actually the same functionality

Diffstat:
Minternal/config/core.go | 1-
Minternal/config/vars.go | 7++-----
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/internal/config/core.go b/internal/config/core.go @@ -54,7 +54,6 @@ type ( cat keyCategory desc string requirement string - whenUnset string } // EnvironmentInt are environment settings that are integers EnvironmentInt struct { diff --git a/internal/config/vars.go b/internal/config/vars.go @@ -203,10 +203,10 @@ Note that this setting is not output as part of the environment.`, noEnvironment environmentBase: environmentBase{ subKey: "KEYMODE", requirement: "must be set to a valid mode when using a key", desc: fmt.Sprintf(`How to retrieve the database store password. Set to '%s' when only using a key file. -Set to '%s' to ignore the set key value`, noKeyMode, IgnoreKeyMode), whenUnset: string(DefaultKeyMode), +Set to '%s' to ignore the set key value`, noKeyMode, IgnoreKeyMode), }, allowed: []string{string(askKeyMode), string(commandKeyMode), string(IgnoreKeyMode), string(noKeyMode), string(plainKeyMode)}, - canDefault: true, defaultValue: "", + canDefault: true, defaultValue: string(DefaultKeyMode), }) envKey = environmentRegister(EnvironmentString{environmentBase: environmentBase{ requirement: requiredKeyOrKeyFile, subKey: "KEY", @@ -246,9 +246,6 @@ func ListEnvironmentVariables() []string { value, allow := item.values() if len(value) == 0 { value = "(unset)" - if env.whenUnset != "" { - value = env.whenUnset - } } description := Wrap(2, env.desc) requirement := "optional/default"