template

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTxtFunc

func GetTxtFunc() map[string]any

GetTxtFunc returns a defaults list of methods for text templating

func New

func New(tpl string, data interface{}) ([]byte, error)

New is called to render a template

func NewWithBytes added in v0.4.0

func NewWithBytes(tpl []byte, data interface{}) ([]byte, error)

NewWithBytes is called to render a template

func NewWithFuncs

func NewWithFuncs(tpl string, methods template.FuncMap, params interface{}) ([]byte, error)

NewWithFuncs renders a template with custom methods

func ToYaml added in v0.4.0

func ToYaml(data interface{}) (string, error)

ToYaml converts a map to yaml

Types

This section is empty.

Jump to

Keyboard shortcuts

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