package handlers import ( "html/template" "net/http" ) type MainPage struct { } func UpdateMainPage(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") tmpl := template.Must( template.New("index.html").ParseFiles("templates/index.html"), ) tmpl.Execute(w, nil) }