renderer

package
v0.4.4 Latest Latest
Warning

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

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

Documentation

Overview

Package renderer provides function to render HTTP templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	// Reload can be set to true to cause template files to be reloaded on each
	// call to Render. This is generally reserved for development.
	Reload bool

	// Files is the set of files that form this template. At least one file must
	// be specified.
	Files []string

	conversation.Error
	// contains filtered or unexported fields
}

Template provides a wrapper around template.Template allowing for ease of rendering, and caching of template files.

func (*Template) Render

func (t *Template) Render(w http.ResponseWriter, d interface{})

Render the Template to the ResponseWriter using the given data d.

Jump to

Keyboard shortcuts

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