AddFunc adds a minify function to the mimetype => function map (unsafe for concurrent use).
(mimetype string, minifier MinifierFunc)
| 145 | |
| 146 | // AddFunc adds a minify function to the mimetype => function map (unsafe for concurrent use). |
| 147 | func (m *M) AddFunc(mimetype string, minifier MinifierFunc) { |
| 148 | m.mutex.Lock() |
| 149 | m.literal[mimetype] = minifier |
| 150 | m.mutex.Unlock() |
| 151 | } |
| 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) { |
no outgoing calls