commit 42a9f114a3f1200222386844ac59e95b4ea19416
parent 615e6409ed9e0d1b91ad6f6664dee6f4e2a1ed34
Author: Sean Enck <sean@ttypty.com>
Date: Sat, 1 Oct 2022 14:01:47 -0400
these parameters are no longer valid
Diffstat:
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/internal/backend/actions.go b/internal/backend/actions.go
@@ -16,7 +16,7 @@ func (t *Transaction) act(cb action) error {
if !t.valid {
return errors.New("invalid transaction")
}
- key, err := inputs.GetKey("", "")
+ key, err := inputs.GetKey()
if err != nil {
return err
}
diff --git a/internal/inputs/env.go b/internal/inputs/env.go
@@ -46,18 +46,12 @@ func EnvOrDefault(envKey, defaultValue string) string {
}
// GetKey will get the encryption key setup for lb
-func GetKey(key, keyMode string) ([]byte, error) {
- useKeyMode := keyMode
- if useKeyMode == "" {
- useKeyMode = os.Getenv(KeyModeEnv)
- }
+func GetKey() ([]byte, error) {
+ useKeyMode := os.Getenv(KeyModeEnv)
if useKeyMode == "" {
useKeyMode = CommandKeyMode
}
- useKey := key
- if useKey == "" {
- useKey = os.Getenv(KeyEnv)
- }
+ useKey := os.Getenv(KeyEnv)
if useKey == "" {
return nil, errors.New("no key given")
}