aboutsummaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'template.go')
-rw-r--r--template.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/template.go b/template.go
index 7e933bb..a98abb1 100644
--- a/template.go
+++ b/template.go
@@ -40,8 +40,8 @@ func lookupPassword(name string) (string, error) {
return strings.TrimRight(string(line), "\n"), nil
}
-func getTemplateData() (*TemplateData, error) {
- vars, err := readVars()
+func getTemplateData(conf *Conf) (*TemplateData, error) {
+ vars, err := readVars(conf)
if err != nil {
return nil, err
}
@@ -63,9 +63,9 @@ func getTemplateData() (*TemplateData, error) {
return data, nil
}
-func readVars() (map[string]interface{}, error) {
+func readVars(conf *Conf) (map[string]interface{}, error) {
var vars map[string]interface{}
- if _, err := toml.DecodeFile(filepath.Join(base, "vars.toml"), &vars); err != nil {
+ if _, err := toml.DecodeFile(filepath.Join(conf.Source, "vars.toml"), &vars); err != nil {
return nil, err
}
return vars, nil