diff --git a/internal/config/secret.go b/internal/config/secret.go index 6451a4e1..1ee3e53d 100644 --- a/internal/config/secret.go +++ b/internal/config/secret.go @@ -1,6 +1,7 @@ package config import ( + "bytes" "fmt" "os" "strings" @@ -41,6 +42,8 @@ func (secret *Secret) UnmarshalText(text []byte) error { return fmt.Errorf("unable read secret %s: %w", filePath, err) } + body = bytes.TrimSpace(body) + *secret = Secret(body) default: *secret = Secret(stringText)