summaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2019-10-26 14:11:19 -0400
committerDave Henderson <dhenderson@gmail.com>2019-10-26 14:17:22 -0400
commit1c1f0f5be4436a6454e17e166f0e950ff30b48c3 (patch)
tree2b1cd8f7e063345235a35d11a93706f7773dd6a3 /tmpl
parent3dc820699130f73dd086469f1a385b60164ead33 (diff)
Refactor context naming to reduce confusion
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/tmpl.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tmpl/tmpl.go b/tmpl/tmpl.go
index cf57cee1..e0c46c20 100644
--- a/tmpl/tmpl.go
+++ b/tmpl/tmpl.go
@@ -43,10 +43,10 @@ func (t *Template) inline(name, in string, ctx interface{}) (string, error) {
}
// Exec - execute (render) a template - this is the built-in `template` action, except with output...
-func (t *Template) Exec(name string, context ...interface{}) (string, error) {
+func (t *Template) Exec(name string, tmplcontext ...interface{}) (string, error) {
ctx := t.defaultCtx
- if len(context) == 1 {
- ctx = context[0]
+ if len(tmplcontext) == 1 {
+ ctx = tmplcontext[0]
}
tmpl := t.root.Lookup(name)
if tmpl == nil {