From 670c6c5c16332f9ede24e7f37409fb192385414e Mon Sep 17 00:00:00 2001
From: Mitchell Hashimoto <mitchell.hashimoto@gmail.com>
Date: Fri, 9 Aug 2013 14:16:30 -0700
Subject: [PATCH] common: UserData => UserVars

---
 common/template.go      | 6 +++---
 common/template_test.go | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/template.go b/common/template.go
index fd78ae9d..199c910b 100644
--- a/common/template.go
+++ b/common/template.go
@@ -12,7 +12,7 @@ import (
 // elements and functions available. Plugin creators should process as
 // many fields as possible through this.
 type Template struct {
-	UserData map[string]string
+	UserVars map[string]string
 
 	root *template.Template
 	i    int
@@ -21,7 +21,7 @@ type Template struct {
 // NewTemplate creates a new template processor.
 func NewTemplate() (*Template, error) {
 	result := &Template{
-		UserData: make(map[string]string),
+		UserVars: make(map[string]string),
 	}
 
 	result.root = template.New("configTemplateRoot")
@@ -68,7 +68,7 @@ func (t *Template) nextTemplateName() string {
 // User is the function exposed as "user" within the templates and
 // looks up user variables.
 func (t *Template) templateUser(n string) (string, error) {
-	result, ok := t.UserData[n]
+	result, ok := t.UserVars[n]
 	if !ok {
 		return "", fmt.Errorf("uknown user var: %s", n)
 	}
diff --git a/common/template_test.go b/common/template_test.go
index 646589f5..51d34fe7 100644
--- a/common/template_test.go
+++ b/common/template_test.go
@@ -35,7 +35,7 @@ func TestTemplateProcess_user(t *testing.T) {
 		t.Fatalf("err: %s", err)
 	}
 
-	tpl.UserData["foo"] = "bar"
+	tpl.UserVars["foo"] = "bar"
 
 	result, err := tpl.Process(`{{user "foo"}}`, nil)
 	if err != nil {
-- 
2.30.9