Documentation
¶
Index ¶
- func From(tag string, data string) (*template.Template, error)
- func MustFrom(tag string, data string) *template.Template
- type Group
- func (g *Group) Add(name string, data string) *Group
- func (g *Group) From(names ...string) (*template.Template, error)
- func (g *Group) FromWith(fn template.FuncMap, names ...string) (*template.Template, error)
- func (g *Group) New(names ...string) (*template.Template, error)
- func (g *Group) NewWith(fn template.FuncMap, names ...string) (*template.Template, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group holds a series of template content with associated name. Group returns new templates based on provided sets.
func (*Group) From ¶
From acts like New but calls template.Lookup on the retunred template to return the first template object forthe first name in the slice provided.
func (*Group) FromWith ¶
FromWith acts like New but calls template.Lookup on the retunred template to return the first template object forthe first name in the slice provided.
func (*Group) New ¶
New returns a template from all templates within group if no names are provided. Either arrange names of support template to main template else use template.Lookup method to retrieve template for respective name.
Click to show internal directories.
Click to hide internal directories.