Versions in this module Expand all Collapse all v0 v0.2.0 Jun 28, 2023 Changes in this version + var DefaultTemplateName = "_templatex" + type OptionExecute func(options *options) + type OptionTemplate func(*optionsTemplate) + func WithAddFunc(key string, f interface{}) OptionTemplate + func WithAddFuncMap(funcMap map[string]interface{}) OptionTemplate + func WithAddFuncTpl(key string, f func(T) interface{}) OptionTemplate + func WithAddFuncsTpl(fn func(T) map[string]interface{}) OptionTemplate + func WithFnValue(fn T) OptionTemplate + func WithHTMLTemplate() OptionTemplate type Template + func (t *Template) FuncInfos() []Info + func (t *Template) SetTypeHtml() + func (t *Template) SetTypeText() v0.1.0 Jun 27, 2023 Changes in this version + type Info struct + Description string + Name string + Usage string + func FuncInfos(fns map[string]interface{}) []Info + type Option func(options *options) + func WithContent(content string) Option + func WithData(values any) Option + func WithIO(w io.Writer) Option + func WithParsed(parsed bool) Option + func WithTemplate(template string) Option + type Template struct + func New(opts ...store.Option) *Template + func (t *Template) AddFunc(name string, fn interface{}) + func (t *Template) AddFuncMap(funcMap textTemplate.FuncMap) + func (t *Template) Execute(opts ...Option) error + func (t *Template) ExecuteBuffer(opts ...Option) ([]byte, error) + func (t *Template) ExecuteTemplate(templateName string, data any) ([]byte, error) + func (t *Template) ListFuncs() []Info + func (t *Template) Parse(content string) error + func (t *Template) ParseGlob(pattern string) error + func (t *Template) Reset() + func (t *Template) SetDelims(left, right string) *Template Other modules containing this package github.com/rytsh/mugo