Track sensitive variable keys to support JSON template writing

Signed-off-by: Brendan Devenney <brendan@devenney.io>
This commit is contained in:
Brendan Devenney 2019-02-23 04:52:03 +00:00
parent d8793e3f85
commit 610eecfc99
No known key found for this signature in database
GPG Key ID: 8A043A630C39877E
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -70,6 +70,7 @@ type Push struct {
// Variable represents a variable within the template
type Variable struct {
Key string
Default string
Required bool
}