Phase 4: upload, LLM extraction, import review flow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jānis Kacēns
2026-05-11 13:15:04 +03:00
parent e53e7662e9
commit 5199c1fa16
10 changed files with 447 additions and 6 deletions
+5 -1
View File
@@ -9,6 +9,10 @@ import (
"qbank/internal/auth"
)
var tmplFuncs = template.FuncMap{
"inc": func(i int) int { return i + 1 },
}
// Renderer parses and executes HTML templates from a directory.
type Renderer struct {
dir string
@@ -18,7 +22,7 @@ func NewRenderer(dir string) *Renderer { return &Renderer{dir: dir} }
// Render executes layout.html + <name>.html, passing data to the "layout" template.
func (r *Renderer) Render(w http.ResponseWriter, status int, name string, data any) {
t, err := template.ParseFiles(
t, err := template.New("").Funcs(tmplFuncs).ParseFiles(
filepath.Join(r.dir, "layout.html"),
filepath.Join(r.dir, name+".html"),
)