You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
409 B

  1. package gotpl
  2. import (
  3. "html/template"
  4. "github.com/PuerkitoBio/ghost/templates"
  5. )
  6. // The template compiler for native Go templates.
  7. type GoTemplateCompiler struct{}
  8. // Implementation of the TemplateCompiler interface.
  9. func (this *GoTemplateCompiler) Compile(f string) (templates.Templater, error) {
  10. return template.ParseFiles(f)
  11. }
  12. func init() {
  13. templates.Register(".tmpl", new(GoTemplateCompiler))
  14. }