Add adds a minifier to the mimetype => function map (unsafe for concurrent use).
(mimetype string, minifier Minifier)
| 138 | |
| 139 | // Add adds a minifier to the mimetype => function map (unsafe for concurrent use). |
| 140 | func (m *M) Add(mimetype string, minifier Minifier) { |
| 141 | m.mutex.Lock() |
| 142 | m.literal[mimetype] = minifier |
| 143 | m.mutex.Unlock() |
| 144 | } |
| 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) { |
no outgoing calls