template

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(name, tmpl string, data interface{}, funcs template.FuncMap) (*bytes.Buffer, error)

Exec executes a template returns rendrred data

func Render

func Render(t RenderTask) error

Render renders a content and output into target io.Writer

Types

type RenderTask

type RenderTask struct {
	Name    string
	Content string
	Out     io.Writer
	Data    interface{}
}

RenderTask to render a template and print the output into target writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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