mustache

package
v0.0.0-...-db657e9 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: Apache-2.0, MIT Imports: 10 Imported by: 0

README

Copied from https://github.com/hoisie/mustache.

We need to expose a function to extract environment variable names from templates.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(data string, context ...interface{}) string

func RenderFile

func RenderFile(filename string, context ...interface{}) string

func RenderFileInLayout

func RenderFileInLayout(filename string, layoutFile string, context ...interface{}) string

func RenderInLayout

func RenderInLayout(data string, layoutData string, context ...interface{}) string

Types

type Template

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

func ParseFile

func ParseFile(filename string) (*Template, error)

func ParseString

func ParseString(data string) (*Template, error)

func (*Template) GetTemplateVariables

func (tmpl *Template) GetTemplateVariables() []string

func (*Template) Render

func (tmpl *Template) Render(context ...interface{}) string

func (*Template) RenderInLayout

func (tmpl *Template) RenderInLayout(layout *Template, context ...interface{}) string

Jump to

Keyboard shortcuts

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