ResponseWriter minifies any writes to the http.ResponseWriter. http.ResponseWriter loses all functionality such as Pusher, Hijacker, Flusher, ... Minification might be slower than just sending the original file! Caching is advised.
(w http.ResponseWriter, r *http.Request)
| 355 | // http.ResponseWriter loses all functionality such as Pusher, Hijacker, Flusher, ... |
| 356 | // Minification might be slower than just sending the original file! Caching is advised. |
| 357 | func (m *M) ResponseWriter(w http.ResponseWriter, r *http.Request) *responseWriter { |
| 358 | mediatype := mime.TypeByExtension(path.Ext(r.RequestURI)) |
| 359 | return &responseWriter{w, nil, m, mediatype} |
| 360 | } |
| 361 | |
| 362 | // Middleware provides a middleware function that minifies content on the fly by intercepting writes to http.ResponseWriter. |
| 363 | // http.ResponseWriter loses all functionality such as Pusher, Hijacker, Flusher, ... |
no outgoing calls