mustache

package
v0.0.0-...-428fbb4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2013 License: BSD-2-Clause, BSD-2-Clause Imports: 9 Imported by: 0

README

mussed

Mussed is a nearly mustache template library that maps to text/template/parse Trees instead of being a complete template library.

Divergences from Mustache

  • Quote characters are escaped with the Code instead of the Entity Name
  • Templates that aren't found are treated as fatal errors instead of empty strings
  • On the third partials test, Go is more proactive than mustache and escaped '<'s where an average mustache would not
  • Partials do not inherit the indentation of their caller, this was found on partial specs 7-9.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LeftDelim        = "{{"
	RightDelim       = "}}"
	LeftEscapeDelim  = "{{{"
	RightEscapeDelim = "}}}"
)

Functions

func Parse

func Parse(templateName, templateContent string) (map[string]*parse.Tree, error)

Types

type MustacheParser

type MustacheParser string

func (MustacheParser) ApplicableExtensions

func (mp MustacheParser) ApplicableExtensions() []string

func (MustacheParser) ParseFile

func (mp MustacheParser) ParseFile(name, content string) (map[string]*parse.Tree, error)

func (MustacheParser) RequiredHtmlFuncs

func (mp MustacheParser) RequiredHtmlFuncs() htmlTemplate.FuncMap

func (MustacheParser) RequiredTextFuncs

func (mp MustacheParser) RequiredTextFuncs() textTemplate.FuncMap

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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