From 0b992c6156a3beba093ff41030783a68f52377ef Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 20 Feb 2017 14:25:18 +0100 Subject: fix pass: Trim leading & trailing whitespace --- templater/pass.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'templater') diff --git a/templater/pass.go b/templater/pass.go index f1dc82986174..fbd2c076412b 100644 --- a/templater/pass.go +++ b/templater/pass.go @@ -8,6 +8,7 @@ import ( "os/exec" "github.com/polydawn/meep" + "strings" ) type PassError struct { @@ -28,5 +29,7 @@ func GetFromPass(key string) (string, error) { ) } - return string(output), nil + trimmed := strings.TrimSpace(string(output)) + + return trimmed, nil } -- cgit 1.4.1