template

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(template string, payload interface{}) (s string, err error)

Render parses and executes a template, returning the results in string format. Trailing or leading spaces or new-lines are not getting truncated. It is able to read templates from remote paths, local files or directly from the string.

func RenderTrim

func RenderTrim(template string, playload interface{}) (string, error)

RenderTrim parses and executes a template, returning the results in string format. The result is trimmed to remove left and right padding and newlines that may be added unintentially in the template markup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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