gext

package module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

README

gext

Golang EXtremely fast Template engine

Under construction

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = GextConfig{LeftDelimeter: "{{", RightDelimeter: "}}", PathTemplates: "./", WatchInterval: 0, LogModify: true}
)

Functions

This section is empty.

Types

type Gext

type Gext struct {
	Config GextConfig
	// contains filtered or unexported fields
}

Engine the goforms template engine

func NewGext

func NewGext(config GextConfig) *Gext

New creates and returns a new template engine

func (*Gext) AddFuncs

func (g *Gext) AddFuncs(funcs map[string]interface{})

func (*Gext) ClearTemplateCache

func (g *Gext) ClearTemplateCache()

ClearTemplateCache - Clear cached templates

func (*Gext) GetParsedPage added in v1.1.1

func (g *Gext) GetParsedPage(name string) (*page, error)

func (*Gext) GetTemplate

func (g *Gext) GetTemplate(name string) (*template.Template, error)

GetTemplate - get parsed template from cache or parse new and cache

func (*Gext) Render

func (g *Gext) Render(w io.Writer, name string, data interface{}) error

func (*Gext) TemplateRemove

func (g *Gext) TemplateRemove(name string)

TemplateRemove - template remove from cache

type GextConfig

type GextConfig struct {
	PathTemplates  string
	LeftDelimeter  string
	RightDelimeter string
	WatchInterval  int
	LogModify      bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL