cerrado @ 519af559f94aab1bd1446cc01144cbf2640fcc6a

 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}