about summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-08-31T16·37+0200
committerVincent Ambo <tazjin@gmail.com>2017-08-31T16·41+0200
commitb20bc5f57a9e4e25760f03de752c2ed2811fa5fe (patch)
treec61a99691557b08977e1a79db59556c2a83be8b2 /util
parent063a3e9d3037c77aea765d7c58bff567b21d5946 (diff)
fix templater: Don't template default.yml files
After the change from #84 default variable files with the '.yml'
extension got templated as resource set templates accidentally.

This resolves the issue by moving the list reserved default file names
to a common place and reusing it in both the templater and context pkg.

This fixes #85
Diffstat (limited to 'util')
-rw-r--r--util/util.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/util.go b/util/util.go
index 0c5815a38b88..eb8806036b00 100644
--- a/util/util.go
+++ b/util/util.go
@@ -9,6 +9,9 @@ import (
 	"github.com/ghodss/yaml"
 )
 
+// Filenames excluded from templating for the purpose of containing default variable values inside a resource set.
+var DefaultFilenames []string = []string{"default.yml", "default.yaml", "default.json"}
+
 // Merges two maps together. Values from the second map override values in the first map.
 // The returned map is new if anything was changed.
 func Merge(in1 *map[string]interface{}, in2 *map[string]interface{}) *map[string]interface{} {