aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--template.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/template.go b/template.go
index 31d4358..7e933bb 100644
--- a/template.go
+++ b/template.go
@@ -16,6 +16,7 @@ type TemplateData struct {
OS string
Arch string
Hostname string
+ Home string
Vars map[string]interface{}
}
@@ -54,6 +55,11 @@ func getTemplateData() (*TemplateData, error) {
} else {
data.Hostname = host
}
+ if home, err := os.UserHomeDir(); err != nil {
+ return nil, err
+ } else {
+ data.Home = home
+ }
return data, nil
}