Versions in this module Expand all Collapse all v2 v2.9.23 Jul 26, 2022 Changes in this version + const MaxInt + const MinInt + var Epsilon = 0.00001 + var ErrNotExist = errors.New("minifier does not exist for mimetype") + var Warning = log.New(os.Stderr, "WARNING: ", 0) + func DataURI(m *M, dataURI []byte) []byte + func Decimal(num []byte, prec int) []byte + func Mediatype(b []byte) []byte + func Number(num []byte, prec int) []byte + type M struct + URL *url.URL + func New() *M + func (m *M) Add(mimetype string, minifier Minifier) + func (m *M) AddCmd(mimetype string, cmd *exec.Cmd) + func (m *M) AddCmdRegexp(pattern *regexp.Regexp, cmd *exec.Cmd) + func (m *M) AddFunc(mimetype string, minifier MinifierFunc) + func (m *M) AddFuncRegexp(pattern *regexp.Regexp, minifier MinifierFunc) + func (m *M) AddRegexp(pattern *regexp.Regexp, minifier Minifier) + func (m *M) Bytes(mediatype string, v []byte) ([]byte, error) + func (m *M) Match(mediatype string) (string, map[string]string, MinifierFunc) + func (m *M) Middleware(next http.Handler) http.Handler + func (m *M) Minify(mediatype string, w io.Writer, r io.Reader) error + func (m *M) MinifyMimetype(mimetype []byte, w io.Writer, r io.Reader, params map[string]string) error + func (m *M) Reader(mediatype string, r io.Reader) io.Reader + func (m *M) ResponseWriter(w http.ResponseWriter, r *http.Request) *minifyResponseWriter + func (m *M) String(mediatype string, v string) (string, error) + func (m *M) Writer(mediatype string, w io.Writer) *minifyWriter + type Minifier interface + Minify func(*M, io.Writer, io.Reader, map[string]string) error + type MinifierFunc func(*M, io.Writer, io.Reader, map[string]string) error + func (f MinifierFunc) Minify(m *M, w io.Writer, r io.Reader, params map[string]string) error Other modules containing this package github.com/ezoic/minify