fix: compute TemplateName in ResultView instead of using dynamic template function
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 7s
Mirror to GitHub / mirror (push) Failing after 3s
Tests / test (push) Failing after 32s

Go html/template doesn't support function calls as template names in
{{template (func .Arg) .}}. Instead, precompute TemplateName in
FromResponse and use {{template .TemplateName .}} in the template.
This commit is contained in:
Franz Kafka 2026-03-22 02:44:50 +00:00
parent d8b65215d5
commit a8104da887
2 changed files with 12 additions and 11 deletions

View file

@ -52,7 +52,7 @@
<div id="urls" role="main">
{{if .Results}}
{{range .Results}}
{{template (templateForResult .Template) .}}
{{template .TemplateName .}}
{{end}}
{{else if not .Answers}}
<div class="no_results">