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
394 B
22 lines
394 B
package handlers |
|
|
|
import ( |
|
"html/template" |
|
"net/http" |
|
) |
|
|
|
type ModeHandler struct { |
|
Tmpl *template.Template |
|
} |
|
|
|
func (m *ModeHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { |
|
data := struct { |
|
Title string |
|
}{ |
|
Title: "Title", |
|
} |
|
|
|
if err := m.Tmpl.ExecuteTemplate(w, "game-mode.html", data); err != nil { |
|
http.Error(w, "Template Error", http.StatusInternalServerError) |
|
} |
|
}
|
|
|