engines

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package engines provides template engine interface and implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateEngine

type TemplateEngine interface {
	// RenderFile applies data to the template from srcPath.
	// Instantiated template is saved as dstPath.
	RenderFile(srcPath string, dstPath string, data interface{}) error

	// RenderFile applies data to the template text. Returns instantiated text.
	RenderText(in string, data interface{}) (string, error)
}

TemplateEngine is an interface to support to use for application template instantiation.

func NewDefaultEngine

func NewDefaultEngine() TemplateEngine

NewDefaultEngine creates and returns default template engine.

Jump to

Keyboard shortcuts

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