From 610eecfc9911ed5fe4be9a33a391968c9511743d Mon Sep 17 00:00:00 2001 From: Brendan Devenney Date: Sat, 23 Feb 2019 04:52:03 +0000 Subject: [PATCH] :sparkles: Track sensitive variable keys to support JSON template writing Signed-off-by: Brendan Devenney --- template/parse.go | 1 + template/template.go | 1 + 2 files changed, 2 insertions(+) diff --git a/template/parse.go b/template/parse.go index 722b1fb3c..23ce3393a 100644 --- a/template/parse.go +++ b/template/parse.go @@ -60,6 +60,7 @@ func (r *rawTemplate) Template() (*Template, error) { } for k, rawV := range r.Variables { var v Variable + v.Key = k // Variable is required if the value is exactly nil v.Required = rawV == nil diff --git a/template/template.go b/template/template.go index 635e9c202..ffbde7ac9 100644 --- a/template/template.go +++ b/template/template.go @@ -70,6 +70,7 @@ type Push struct { // Variable represents a variable within the template type Variable struct { + Key string Default string Required bool }