Documentation ¶
Overview ¶
Package templateutil features LazyTemplate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LazyTemplate ¶
type LazyTemplate struct { Mutex sync.Mutex // protects everything Template *template.Template // contains filtered or unexported fields }
LazyTemplate encloses template.Template. Lazy parse , always clone for bin templates , sometimes re-parse for dev-bins . NewLT is the constructor.
func NewLT ¶
func NewLT(readfunc readFunc, infofunc infoFunc, filename string) *LazyTemplate
NewLT constructs LazyTemplate.
func (*LazyTemplate) Apply ¶
func (lt *LazyTemplate) Apply(w http.ResponseWriter, data interface{})
Apply executes enclosed template into w.
Click to show internal directories.
Click to hide internal directories.