cerrado @ e9098e00fb6339b759df5b0df2e086cef8a7ce83

 1package ext
 2
 3import "net/http"
 4
 5type ContentType = string
 6
 7const (
 8	TextHTML ContentType = "text/html"
 9)
10
11func Html(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
12	return func(w http.ResponseWriter, r *http.Request) {
13		next(w, r)
14	}
15}
16
17func SetHTML(w http.ResponseWriter) {
18	SetMIME(w, TextHTML)
19
20}
21
22func SetMIME(w http.ResponseWriter, mime ContentType) {
23	w.Header().Add("Content-Type", mime)
24}