Complete addition of GET option. Build container.
This commit is contained in:
@@ -15,7 +15,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
templatePath := "templates" + path + ".html"
|
||||
if _, err := os.Stat(templatePath); err == nil {
|
||||
tmpl, err := template.ParseFiles("templates/base.html", templatePath)
|
||||
tmpl, err := template.ParseFiles("./templates/base.html", "./"+templatePath)
|
||||
if err != nil {
|
||||
fmt.Println("Error parsing template: ", err)
|
||||
http.Error(w, "Error parsing template", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user