template

package module
v0.0.0-...-e4cddda Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2015 License: MIT Imports: 8 Imported by: 0

README

Muta Template

A muta Streamer to render Go Templates from Stream Data.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Template

func Template(p string) muta.Streamer

An alias for TemplateOpts, with default Options.

func TemplateData

func TemplateData(p string, data interface{})

An alias for TemplateOpts, with default options and user data Not Implemented

func TemplateOpts

func TemplateOpts(templatesPath string, opts Options) muta.Streamer

Types

type Options

type Options struct {
	// The keyword used on the Ctx map to find the template name.
	CtxTemplateKeyword string

	// Ignore any encountered template errors, and simply return
	// the raw data.
	IgnoreTemplateErrors bool

	// If found, include the front matter into the template's data
	IncludeFrontMatter bool
}

func NewOptions

func NewOptions() Options

Return an Options struct with Default Options

Jump to

Keyboard shortcuts

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