package handlers import ( "html/template" "net/http" ) // InstallHandler handles the /install page type InstallHandler struct { Templates *template.Template RegistryURL string } func (h *InstallHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { data := struct { PageData }{ PageData: NewPageData(r, h.RegistryURL), } if err := h.Templates.ExecuteTemplate(w, "install", data); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } }