Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

20 lignes
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. }