templates

package
v1.100.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 29 Imported by: 1

Documentation

Overview

Package templates wraps the stdlib with helper functions for html/template to assist with common actions, i18n or assets versioning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group added in v1.66.0

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

func NewFromReader added in v1.66.0

func NewFromReader(r io.Reader, opts ...PreloadOption) (*Group, error)

func Preload added in v1.66.0

func Preload(opts ...PreloadOption) (*Group, error)

func (*Group) Execute added in v1.66.0

func (g *Group) Execute(w io.Writer, data interface{}) error

func (*Group) ExecuteTemplate added in v1.66.0

func (g *Group) ExecuteTemplate(w io.Writer, name string, data interface{}) error

type PreloadOption added in v1.66.0

type PreloadOption func(g *Group)

func WithFunc added in v1.66.0

func WithFunc(name string, fn interface{}) PreloadOption

func WithGlob added in v1.66.0

func WithGlob(glob string) PreloadOption

func WithRoot added in v1.66.0

func WithRoot(root string) PreloadOption

type RuntimeVar added in v1.66.0

type RuntimeVar struct {
	Value interface{}
}

Jump to

Keyboard shortcuts

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