summaryrefslogtreecommitdiff
path: root/lexsurf.go
diff options
context:
space:
mode:
Diffstat (limited to 'lexsurf.go')
-rw-r--r--lexsurf.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lexsurf.go b/lexsurf.go
index 5c1e15a..45eca6a 100644
--- a/lexsurf.go
+++ b/lexsurf.go
@@ -53,7 +53,7 @@ func main() {
var tpl, _ = template.New("").Funcs(template.FuncMap{
"ToUpper": strings.ToUpper,
-}).ParseGlob("views/*")
+}).ParseGlob("templates/*")
type handler struct {
domain string
@@ -68,7 +68,7 @@ func (h *handler) handle(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("page not found"))
return
}
- err := tpl.ExecuteTemplate(w, "index.html", map[string]any{
+ err := tpl.ExecuteTemplate(w, "index.html.tmpl", map[string]any{
"Countries": h.countries,
"Domain": r.Host,
})
@@ -109,7 +109,7 @@ func (h *handler) handle(w http.ResponseWriter, r *http.Request) {
}
}
_, hasJSONLaws := h.lawsByCC[cc]
- err := tpl.ExecuteTemplate(w, "search.html", map[string]any{
+ err := tpl.ExecuteTemplate(w, "search.html.tmpl", map[string]any{
"TLD": cc,
"Domain": h.domain,
"Country": h.countries[cc],