From 1982e06c6fd839a69576c5406ceebab966d50d2d Mon Sep 17 00:00:00 2001 From: Emile Date: Fri, 16 Aug 2024 22:56:01 +0200 Subject: some better logging on template reading issues... --- src/http.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/http.go') diff --git a/src/http.go b/src/http.go index 0b7481e..6cbbce8 100644 --- a/src/http.go +++ b/src/http.go @@ -3,6 +3,7 @@ package main import ( "fmt" "html/template" + "log" "net/http" ) @@ -43,6 +44,7 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { // get the template t, err := template.ParseGlob(fmt.Sprintf("%s/*.html", templatesPath)) if err != nil { + log.Printf("Error reading the template Path: %s/*.html", templatesPath) w.WriteHeader(http.StatusInternalServerError) w.Write([]byte("500 - Error reading template file")) return -- cgit 1.4.1