template

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidTemplate represents an invalid template data error.
	ErrInvalidTemplate = errors.New("invalid template data")
)

Functions

func Expand

func Expand(data string, attrs map[string]interface{}) (string, error)

Expand parses a given string replacing template keys with attributes values.

func Parse

func Parse(data string) ([]string, error)

Parse parses a given string, returning the list of template keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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