Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

gotpl.go 409 B

8 år sedan
12345678910111213141516171819
  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. }