Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TemplateBundle ¶
type TemplateBundle struct { TemplateDir string // template directory in the template bundle OutputFile string // output file Regenerate bool // regenerate output file if it already exists FS embed.FS // template bundle file system FuncMap template.FuncMap // template functions }
TemplateBundle contains configuration of a template bundle
type TemplateBundleList ¶
type TemplateBundleList []*TemplateBundle
TemplateBundleList is a list of template bundles
func (*TemplateBundleList) Add ¶
func (t *TemplateBundleList) Add(tb ...*TemplateBundle) *TemplateBundleList
Add adds or replaces template bundle by output file
func (*TemplateBundleList) Generate ¶
func (t *TemplateBundleList) Generate(outputDir string, data any) error
Generate generates the template bundle list
func (*TemplateBundleList) Remove ¶
func (t *TemplateBundleList) Remove(outputFile string) *TemplateBundleList
Remove removes template bundle by output file
Click to show internal directories.
Click to hide internal directories.