cerrado @ 10925e006bf43edc79331fbe601e09a28c43df2b

 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}