templateset

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateSet

type TemplateSet struct {
	// contains filtered or unexported fields
}

TemplateSet proccessed templates container

func NewTemplateSet

func NewTemplateSet(config *core.Configuration, log *core.Logger) *TemplateSet

NewTemplateSet creates templateSet instance

func (*TemplateSet) IsExist added in v0.0.14

func (t *TemplateSet) IsExist(templateName string) (tmpl *template.Template, ok bool)

IsExist checks if a given template exist and returns it

func (*TemplateSet) ReloadTemplates added in v0.0.8

func (t *TemplateSet) ReloadTemplates(quiet bool)

ReloadTemplates reloads all templates from templateDir

func (*TemplateSet) Render

func (t *TemplateSet) Render(templateName string, data map[string]interface{}) ([]byte, bool)

Render todo

func (*TemplateSet) RenderError added in v0.0.13

func (t *TemplateSet) RenderError(status int) ([]byte, bool)

RenderError renders error page with status code set

type TemplateSetError

type TemplateSetError struct {
	Err error
}

func (*TemplateSetError) Error

func (tse *TemplateSetError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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