tmplrun

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

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

Runner is a go template runner. It accepts a go template and data, and runs the rendered template as a go program.

func New

func New(name string, tmpl *template.Template) *Runner

New returns a new Runner.

func (*Runner) Run

func (r *Runner) Run(data interface{}) (string, error)

Run runs the template and returns the output.

Jump to

Keyboard shortcuts

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