Engine is Pine's HTML template engine. It implements pine.ViewEngine and pine.Reloader using Go's html/template package. All fields are safe for concurrent use.
| 27 | // It implements pine.ViewEngine and pine.Reloader using Go's html/template |
| 28 | // package. All fields are safe for concurrent use. |
| 29 | type Engine struct { |
| 30 | mu sync.RWMutex |
| 31 | tmpl *template.Template |
| 32 | viewPath string |
| 33 | liveReloadPath string // non-empty when LiveReload is active |
| 34 | } |
| 35 | |
| 36 | // New creates and returns a new Engine pre-loaded with all templates found |
| 37 | // under viewPath. Supported extensions: .html, .gohtml, .tmpl. |
nothing calls this directly
no outgoing calls
no test coverage detected