tmpl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tmpl provides a wrapper around golang's html/template package, and provides additional template manipulation functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultFunc

func AddDefaultFunc(name string, function interface{})

func AppendDir

func AppendDir(dir string, scripts []string) []string

func GetScript

func GetScript(filepath string) string

func SetPartialsLocation

func SetPartialsLocation(location string)

func SetTitle

func SetTitle(data map[string]interface{}, title string) map[string]interface{}

func StrEq

func StrEq(a, b interface{}) bool

Types

type Template

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

func NewTemplate

func NewTemplate(name string) *Template

func (*Template) AddTmpl

func (t *Template) AddTmpl(name string)

func (*Template) AddTmpls

func (t *Template) AddTmpls(names []string)

func (*Template) Execute

func (t *Template) Execute(w io.Writer, data interface{}) error

Jump to

Keyboard shortcuts

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