templates

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

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

	// RenderText 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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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