templates

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package templates generates and stores HTML templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile() error

Compile reads template HTML from disk, injects dynamic variables, hashes and stores them

func Set

func Set(name string, s Store)

Set sets a template to the specified value. Only use in tests.

Types

type Store

type Store struct {
	HTML []byte
	Hash string
}

Store stores the compiled HTML template and the corresponding truncated MD5 hash of said template

func Get

func Get(name string) Store

Get retrieves a compiled template by its name

Jump to

Keyboard shortcuts

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