Documentation
¶
Index ¶
- Variables
- func CopyMap(source map[string]interface{}) map[string]interface{}
- func ReplaceAll(s string, old, new []string) string
- type HtmlTemplate
- type Loader
- func (this *Loader) AddPatterns(patterns ...string)
- func (this *Loader) DefaultKind() string
- func (this *Loader) ExecNamePattern() string
- func (this *Loader) Funcs(funcMap map[string]interface{})
- func (this *Loader) Get(group, name string) (*Template, error)
- func (this *Loader) GetFull(kind, group, name string) (*Template, error)
- func (this *Loader) GetValue(name string) interface{}
- func (this *Loader) Patterns() []string
- func (this *Loader) SetDefaultKind(kind string)
- func (this *Loader) SetExecNamePattern(execNamePattern string)
- func (this *Loader) SetPatterns(patterns []string)
- func (this *Loader) SetTemplateRoot(root string)
- func (this *Loader) SetValue(name string, value interface{})
- func (this *Loader) TemplateRoot() string
- type Template
- func (this *Template) Execute(writer io.Writer, data interface{}) error
- func (this *Template) ExecuteTemplate(writer io.Writer, name string, data interface{}) error
- func (this *Template) Funcs(funcMap map[string]interface{})
- func (this *Template) GetValue(name string) interface{}
- func (this *Template) Group() string
- func (this *Template) Kind() string
- func (this *Template) Name() string
- func (this *Template) ParseGlob(pattern string) error
- func (this *Template) Patterns() []string
- func (this *Template) SetValue(name string, value interface{})
- type TemplateCore
- type TemplateCoreConstructor
- type TextTemplate
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFactory *templateFactory = newTemplateFactory()
Functions ¶
func ReplaceAll ¶
Types ¶
type HtmlTemplate ¶
type HtmlTemplate struct {
// contains filtered or unexported fields
}
func (*HtmlTemplate) ExecuteTemplate ¶
func (this *HtmlTemplate) ExecuteTemplate(writer io.Writer, name string, data interface{}) error
func (*HtmlTemplate) Funcs ¶
func (this *HtmlTemplate) Funcs(funcMap map[string]interface{})
func (*HtmlTemplate) ParseGlob ¶
func (this *HtmlTemplate) ParseGlob(pattern string) error
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) AddPatterns ¶
func (*Loader) DefaultKind ¶
func (*Loader) ExecNamePattern ¶
func (*Loader) SetDefaultKind ¶
func (*Loader) SetExecNamePattern ¶
func (*Loader) SetPatterns ¶
func (*Loader) SetTemplateRoot ¶
func (*Loader) TemplateRoot ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func NewTemplate ¶
func (*Template) ExecuteTemplate ¶
type TemplateCore ¶
type TemplateCore interface {
Funcs(funcMap map[string]interface{})
ParseGlob(pattern string) error
ExecuteTemplate(writer io.Writer, name string, data interface{}) error
}
func NewHtmlTemplate ¶
func NewHtmlTemplate(name string) TemplateCore
func NewTextTemplate ¶
func NewTextTemplate(name string) TemplateCore
type TemplateCoreConstructor ¶
type TemplateCoreConstructor func(name string) TemplateCore
type TextTemplate ¶
type TextTemplate struct {
// contains filtered or unexported fields
}
func (*TextTemplate) ExecuteTemplate ¶
func (this *TextTemplate) ExecuteTemplate(writer io.Writer, name string, data interface{}) error
func (*TextTemplate) Funcs ¶
func (this *TextTemplate) Funcs(funcMap map[string]interface{})
func (*TextTemplate) ParseGlob ¶
func (this *TextTemplate) ParseGlob(pattern string) error
Click to show internal directories.
Click to hide internal directories.
