render

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(w io.Writer, fmt string, ctx *Context) error

Execute renders a template of the fmt format into w. The fmt argument can also be a path to a local file.

func HTML

func HTML(env string, nodes ...types.Node) (htmlTemplate.HTML, error)

HTML renders nodes as the markup for the target env.

func MD added in v0.3.1

func MD(env string, nodes ...types.Node) (string, error)

MD renders nodes as markdown for the target env.

func WriteHTML

func WriteHTML(w io.Writer, env string, nodes ...types.Node) error

WriteHTML does the same as HTML but outputs rendered markup to w.

func WriteMD added in v0.3.1

func WriteMD(w io.Writer, env string, nodes ...types.Node) error

WriteMD does the same as MD but outputs rendered markup to w.

Types

type Context

type Context struct {
	Env      string
	Prefix   string
	GlobalGA string
	Meta     *types.Meta
	Steps    []*types.Step
	Extra    map[string]string // Extra variables passed from the command line.
}

Context is a template context during execution.

Jump to

Keyboard shortcuts

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