templates

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLTemplate

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

HTMLTemplate is a wrapper around html/template package

func NewHTMLTemplate

func NewHTMLTemplate() *HTMLTemplate

NewHTMLTemplate returns a new HTMLTemplate

func (*HTMLTemplate) ExecuteTemplate

func (ht *HTMLTemplate) ExecuteTemplate(rw io.Writer, path string, data interface{})

ExecuteTemplate wraps the html/template ExecuteTemplate function

type MockTemplate

type MockTemplate struct{}

MockTemplate mocks the template interface wrapper

func (*MockTemplate) ExecuteTemplate

func (mt *MockTemplate) ExecuteTemplate(rw io.Writer, path string, data interface{})

ExecuteTemplate write the data to the io.Writer

type Template

type Template interface {
	ExecuteTemplate(io.Writer, string, interface{})
}

Template represents html templates

Jump to

Keyboard shortcuts

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