LoadHTMLGlob loads HTML files identified by glob pattern and associates the result with HTML renderer.
(pattern string)
| 270 | // LoadHTMLGlob loads HTML files identified by glob pattern |
| 271 | // and associates the result with HTML renderer. |
| 272 | func (engine *Engine) LoadHTMLGlob(pattern string) { |
| 273 | left := engine.delims.Left |
| 274 | right := engine.delims.Right |
| 275 | templ := template.Must(template.New("").Delims(left, right).Funcs(engine.FuncMap).ParseGlob(pattern)) |
| 276 | |
| 277 | if IsDebugging() { |
| 278 | debugPrintLoadTemplate(templ) |
| 279 | engine.HTMLRender = render.HTMLDebug{Glob: pattern, FuncMap: engine.FuncMap, Delims: engine.delims} |
| 280 | return |
| 281 | } |
| 282 | |
| 283 | engine.SetHTMLTemplate(templ) |
| 284 | } |
| 285 | |
| 286 | // LoadHTMLFiles loads a slice of HTML files |
| 287 | // and associates the result with HTML renderer. |