feat: split results into insertable component

still not fully sure how this all operates, but allright.
This commit is contained in:
efim
2023-10-04 09:13:12 +00:00
parent f4ab1ac7ec
commit 2cb3cc7c35
4 changed files with 59 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ func main() {
// main page with results summary
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
templateName := "templates/summary-component.gohtml"
tmpl := template.Must(template.ParseFS(templates, templateName))
tmpl := template.Must(template.ParseFS(templates, "templates/index.gohtml", templateName))
if err := tmpl.Execute(w, resultsData); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}