mustache

package
v7.0.1-0...-b8e8e6a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0, MIT Imports: 10 Imported by: 4

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