package handlers import ( "html/template" "net/http" "lash" ) type ShareData struct { Version string FileName string } func (h *ShareData) Handler(w http.ResponseWriter, r *http.Request) { tmpl := template.Must(template.ParseFS(lash.Templates, "templates/share.html")) if err := tmpl.ExecuteTemplate(w, "share.html", h); err != nil { http.Error(w, "template render error: "+err.Error(), http.StatusInternalServerError) } }