template

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(provider string, creator TemplateEngineCreator)

Register a template engine to the registry

Types

type Provider

type Provider interface {
	Execute(w io.Writer, data map[string]interface{}) error
}

Template provider interface

func NewTemplateEngine

func NewTemplateEngine(providerName string, text string) (Provider, error)

NewTemplateEngine create new template engine

type TemplateEngineCreator

type TemplateEngineCreator func(text string) (Provider, error)

TemplateEngineCreator function for create a template engine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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