Versions in this module Expand all Collapse all v1 v1.1.0 Mar 31, 2025 v1.0.0 Jul 6, 2024 Changes in this version + func Traverse(cur parse.Node, visitors ...Visitor) + type AnalysisHelper struct + func Analyze(tp TemplateProvider, opts ParseOptions, analyzers []Analyzer) (*AnalysisHelper, error) + func (h *AnalysisHelper) AddError(node parse.Node, err string) + func (h *AnalysisHelper) AddFunc(name string, fn interface{}) + func (h *AnalysisHelper) AddWarning(node parse.Node, err string) + func (h *AnalysisHelper) Context() context.Context + func (h *AnalysisHelper) FuncMap() FuncMap + func (h *AnalysisHelper) GetDefinedField(name string) *FieldNode + func (h *AnalysisHelper) IsDefinedTemplate(name string) bool + func (h *AnalysisHelper) WithContext(ctx context.Context) + type Analyzer func(res *AnalysisHelper) AnalyzerFunc + type AnalyzerFunc func(val reflect.Value, node parse.Node) + type CompilerOption func(opts *CompilerOptions) + func UseAnalyzers(analyzers ...Analyzer) CompilerOption + func UseFuncs(funcs FuncMap) CompilerOption + func UseParseOptions(parseOpts ParseOptions) CompilerOption + type CompilerOptions struct + type FieldNode struct + Children []*FieldNode + Parent *FieldNode + StructField reflect.StructField + Value reflect.Value + func (node *FieldNode) FindPath(path []string) *FieldNode + func (node *FieldNode) GetKind() reflect.Kind + func (node *FieldNode) IsKind(kind reflect.Kind) (reflect.Kind, bool) + type FuncMap = template.FuncMap + type FuncMapProvider interface + TemplateFuncMap func() FuncMap + type ParseOptions struct + Funcs FuncMap + LeftDelim string + RightDelim string + type RenderOption func(p *RenderProcess) + func WithFuncs(funcs template.FuncMap) RenderOption + func WithName(name string) RenderOption + func WithTarget(target ...string) RenderOption + type RenderProcess struct + Targets []string + Template *template.Template + type Template interface + Render func(w io.Writer, data T, opts ...RenderOption) error + RenderToChan func(ch chan string, data T, opts ...RenderOption) error + RenderToString func(data T, opts ...RenderOption) (string, error) + func Compile[T TemplateProvider](tp T, opts ...CompilerOption) (Template[T], error) + func MustCompile[T TemplateProvider](p T, opts ...CompilerOption) Template[T] + type TemplateProvider interface + TemplateText func() string + type Visitor = func(parse.Node)