No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

20 líneas
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. }