AddRegexp adds a minifier to the mimetype => function map (unsafe for concurrent use).
(pattern *regexp.Regexp, minifier Minifier)
| 152 | |
| 153 | // AddRegexp adds a minifier to the mimetype => function map (unsafe for concurrent use). |
| 154 | func (m *M) AddRegexp(pattern *regexp.Regexp, minifier Minifier) { |
| 155 | m.mutex.Lock() |
| 156 | m.pattern = append(m.pattern, patternMinifier{pattern, minifier}) |
| 157 | m.mutex.Unlock() |
| 158 | } |
| 159 | |
| 160 | // AddFuncRegexp adds a minify function to the mimetype => function map (unsafe for concurrent use). |
| 161 | func (m *M) AddFuncRegexp(pattern *regexp.Regexp, minifier MinifierFunc) { |