From 535d34544675f06176511ef7bf976e3da2a0ab7c Mon Sep 17 00:00:00 2001 From: iosmanthus Date: Thu, 6 Jun 2024 16:44:43 +0800 Subject: [PATCH] test Signed-off-by: iosmanthus --- pkgs/sops-install-secrets/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/sops-install-secrets/main.go b/pkgs/sops-install-secrets/main.go index 52751d9..26381c6 100644 --- a/pkgs/sops-install-secrets/main.go +++ b/pkgs/sops-install-secrets/main.go @@ -242,8 +242,8 @@ func recurseSecretKey(format FormatType, keys map[string]interface{}, wantedKey if !ok { return "", fmt.Errorf("the key '%s' cannot be found", keyUntilNow) } - var valWithWrongType map[interface{}]interface{} - valWithWrongType, ok = val.(map[interface{}]interface{}) + var valWithWrongType map[string]interface{} + valWithWrongType, ok = val.(map[string]interface{}) if !ok { return "", fmt.Errorf("key '%s' does not refer to a dictionary", keyUntilNow) } @@ -474,7 +474,7 @@ func (app *appContext) validateSopsFile(s *secret, file *secretFile) error { if app.checkMode != Manifest && (s.Format != Binary && s.Format != Dotenv && s.Format != Ini) { _, err := recurseSecretKey(s.Format, file.keys, s.Key) if err != nil { - return fmt.Errorf("secret %s in %s is not valid: %w (format: %s)", s.Name, s.SopsFile, err, s.Format) + return fmt.Errorf("secret %s in %s is not valid: %w", s.Name, s.SopsFile, err) } } return nil