From 95f888cdc59ef11c89ec3b2f22e71a52765e5180 Mon Sep 17 00:00:00 2001 From: iosmanthus Date: Thu, 14 Dec 2023 00:21:20 +0800 Subject: [PATCH] trim strVal Signed-off-by: iosmanthus --- pkgs/sops-install-secrets/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/sops-install-secrets/main.go b/pkgs/sops-install-secrets/main.go index c324337..a153451 100644 --- a/pkgs/sops-install-secrets/main.go +++ b/pkgs/sops-install-secrets/main.go @@ -264,6 +264,7 @@ func recurseSecretKey(format FormatType, keys map[string]interface{}, wantedKey if err != nil { return "", fmt.Errorf("Cannot marshal the value of key '%s': %w", keyUntilNow, err) } + strVal = bytes.TrimSpace(strVal) return string(strVal), nil }