Minify minifies the content of a Reader and writes it to a Writer (safe for concurrent use). An error is returned when no such mimetype exists (ErrNotExist) or when an error occurred in the minifier function. Mediatype may take the form of 'text/plain', 'text/*', '*/*' or 'text/plain; charset=UTF-8;
(mediatype string, w io.Writer, r io.Reader)
| 204 | // An error is returned when no such mimetype exists (ErrNotExist) or when an error occurred in the minifier function. |
| 205 | // Mediatype may take the form of 'text/plain', 'text/*', '*/*' or 'text/plain; charset=UTF-8; version=2.0'. |
| 206 | func (m *M) Minify(mediatype string, w io.Writer, r io.Reader) error { |
| 207 | mimetype, params := parse.Mediatype([]byte(mediatype)) |
| 208 | return m.MinifyMimetype(mimetype, w, r, params) |
| 209 | } |
| 210 | |
| 211 | // MinifyMimetype minifies the content of a Reader and writes it to a Writer (safe for concurrent use). |
| 212 | // It is a lower level version of Minify and requires the mediatype to be split up into mimetype and parameters. |
no test coverage detected