...

Source file src/code.rocketnine.space/tslocum/sriracha/template.go

Documentation: code.rocketnine.space/tslocum/sriracha

     1  package sriracha
     2  
     3  import (
     4  	"log"
     5  	"text/template"
     6  
     7  	"code.rocketnine.space/tslocum/sriracha/asset"
     8  )
     9  
    10  var templates = loadTemplates()
    11  
    12  func loadTemplates() *template.Template {
    13  	t, err := template.ParseFS(asset.FS, "template/*.gohtml")
    14  	if err != nil {
    15  		log.Fatalf("failed to load templates: %s", err)
    16  	}
    17  	return t
    18  }
    19  

View as plain text