You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
396 B

package handlers
import (
"html/template"
"net/http"
)
type ResultHandler struct {
Tmpl *template.Template
}
func (r *ResultHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
data := struct {
Title string
}{
Title: "Title",
}
if err := r.Tmpl.ExecuteTemplate(w, "success.html", data); err != nil {
http.Error(w, "Template Error", http.StatusInternalServerError)
}
}