aboutsummaryrefslogtreecommitdiffstats
path: root/lib/templates/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/templates/template.go')
-rw-r--r--lib/templates/template.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/templates/template.go b/lib/templates/template.go
index 6eae591a..4d96472d 100644
--- a/lib/templates/template.go
+++ b/lib/templates/template.go
@@ -5,21 +5,16 @@ import (
"fmt"
"io"
"os"
- "path"
"reflect"
"text/template"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/models"
- "github.com/mitchellh/go-homedir"
)
func findTemplate(templateName string, templateDirs []string) (string, error) {
for _, dir := range templateDirs {
- templateFile, err := homedir.Expand(path.Join(dir, templateName))
- if err != nil {
- return "", err
- }
-
+ templateFile := xdg.ExpandHome(dir, templateName)
if _, err := os.Stat(templateFile); os.IsNotExist(err) {
continue
}