tinker

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 9 Imported by: 0

README

Tinker

Simple echo Template Renderer.

Example usage:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tinker

type Tinker struct {
	// Template files extension.
	Ext string

	// Root folder for the templates.
	Root string

	// Path to layout templates, relative to Tinker.Root.
	Layouts string

	// Path to  page templates, relative to Tinker.Root.
	Pages string

	// Path to include templates, relative to Tinker.Root.
	Includes string

	// Default layout.
	DefaultLayout string

	// Optional FuncMap.
	FuncMap template.FuncMap

	// Reload templates on every render.
	Reload bool
	// contains filtered or unexported fields
}

Tinker struct.

func New

func New() *Tinker

New creates an instance of Tinker.

func (*Tinker) Load

func (t *Tinker) Load() error

Load loads and parses all templates.

func (*Tinker) Render

func (t *Tinker) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render implements the echo.Renderer interface.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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