Versions in this module Expand all Collapse all v0 v0.12.5 Mar 4, 2020 v0.12.4 Mar 3, 2020 v0.12.3 Feb 7, 2019 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.2 Dec 13, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.1 Dec 8, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.0 Dec 2, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work Changes in this version + var DefaultDelimiter = "{{.}}" + var ErrTemplateEngineIsNil = errors.New("view: engine value is nil") + var ErrTemplateKeyExists = errors.New("view: template key exists") + var ErrTemplateNotFound = errors.New("view: template not found") + var TemplateFuncMap = make(template.FuncMap) + func AddEngine(name string, engine Enginer) error + func AddTemplateFunc(funcMap template.FuncMap) + func StripPathPrefixAt(str, pathCut string) string + func TrimPathPrefix(prefix string, fpaths ...string) string + type EngineBase struct + AppConfig *config.Config + BaseDir string + CaseSensitive bool + FileExt string + IsLayoutEnabled bool + LeftDelim string + Name string + RightDelim string + Templates map[string]*Templates + VFS *vfs.VFS + func (eb *EngineBase) AddTemplate(layout, key string, tmpl *template.Template) error + func (eb *EngineBase) AutoFieldInsertion(name, v string) string + func (eb *EngineBase) DirsPath(subDir string) ([]string, error) + func (eb *EngineBase) FilesPath(subDir string) ([]string, error) + func (eb *EngineBase) Get(layout, tpath, tmplName string) (*template.Template, error) + func (eb *EngineBase) Init(fs *vfs.VFS, appCfg *config.Config, ...) error + func (eb *EngineBase) LayoutFiles() ([]string, error) + func (eb *EngineBase) NewTemplate(key string) *template.Template + func (eb *EngineBase) Open(filename string) (string, error) + func (eb *EngineBase) ParseErrors(errs []error) error + func (eb *EngineBase) ParseFile(filename string) (*template.Template, error) + func (eb *EngineBase) ParseFiles(t *template.Template, filenames ...string) (*template.Template, error) + func (eb *EngineBase) SetHotReload(r bool) + type Enginer interface + Get func(layout, path, tmplName string) (*template.Template, error) + Init func(fs *vfs.VFS, appCfg *config.Config, baseDir string) error + func GetEngine(name string) (Enginer, bool) + type GoViewEngine struct + func (e *GoViewEngine) Init(fs *vfs.VFS, appCfg *config.Config, baseDir string) error + type Templates struct + func (t *Templates) Add(key string, tmpl *template.Template) error + func (t *Templates) IsExists(key string) bool + func (t *Templates) Keys() []string + func (t *Templates) Lookup(key string) *template.Template