template

package
v0.0.0-...-8d97d4a Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 6 Imported by: 4

Documentation

Overview

Package template is a thin wrapper over go's text/template and html/template packages. It allows you to use either of them with a single api. Text or HTML are inferred from the template name

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncMap

type FuncMap map[string]interface{}

type Template

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

func Must

func Must(t *Template, err error) *Template

func New

func New(name string) *Template

func (*Template) Execute

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

func (*Template) Funcs

func (t *Template) Funcs(fm FuncMap) *Template

func (*Template) New

func (t *Template) New(name string) *Template

func (*Template) Parse

func (t *Template) Parse(text string) (*Template, error)

Jump to

Keyboard shortcuts

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