summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-11-11 13:57:42 +0100
committerReto Brunner <reto@labrat.space>2020-11-11 13:58:05 +0100
commita9ae91c2d8d106ec85650fc0534c9cdffa8541eb (patch)
tree1e2e73ccf995b2f35ec6d72f7898a3c3228a30af
parentf6a0eb8e14c25e49ca18dfc89726a7123afccd67 (diff)
downloadaerc-a9ae91c2d8d106ec85650fc0534c9cdffa8541eb.tar.gz
templates: better error message
-rw-r--r--lib/templates/template.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/templates/template.go b/lib/templates/template.go
index 4346111..1c7b546 100644
--- a/lib/templates/template.go
+++ b/lib/templates/template.go
@@ -2,7 +2,7 @@ package templates
 
 import (
 	"bytes"
-	"errors"
+	"fmt"
 	"io"
 	"net/mail"
 	"os"
@@ -190,7 +190,8 @@ func findTemplate(templateName string, templateDirs []string) (string, error) {
 		return templateFile, nil
 	}
 
-	return "", errors.New("Can't find template - " + templateName)
+	return "", fmt.Errorf(
+		"Can't find template %q in any of %v ", templateName, templateDirs)
 }
 
 func ParseTemplateFromFile(templateName string, templateDirs []string, data interface{}) (io.Reader, error) {
screen' href='/danisanti/profani-tty/commit/src/ui.h?id=11125561f86cc44672fedf18965cfbb2221126d7'>11125561 ^
7344a68f ^












17a284b2 ^
8c24a7c4 ^
17a284b2 ^
0ddf97e0 ^

17a284b2 ^

2101f29e ^
7aa1d931 ^
b79e61fd ^
7aa1d931 ^
2101f29e ^

7aa1d931 ^
a7190ed7 ^

9e63c4a0 ^
a7190ed7 ^

02f5df5b ^
632528a9 ^
caa95562 ^
f533c6c1 ^
355f2a68 ^
dd9f6f82 ^
d9c47c9b ^


02f5df5b ^

2acf15de ^
02f5df5b ^
b3f42cd3 ^
8b1653f7 ^
f533c6c1 ^


4f82ece2 ^
0ddf97e0 ^
f533c6c1 ^



9805b2b2 ^
2375b7ae ^

02f5df5b ^


5f60e463 ^
f533c6c1 ^
f533c6c1 ^


a336148c ^
02f5df5b ^
9e63c4a0 ^
e112ef5a ^
e5d4e09f ^
9e63c4a0 ^

f533c6c1 ^


6ab1a84c ^
9e63c4a0 ^
a7190ed7 ^

4f82ece2 ^
a7190ed7 ^
6f69ce26 ^
4a2ff760 ^
a7190ed7 ^
03b90cf5 ^
a7190ed7 ^
a7190ed7 ^
134e5d17 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122