template

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replace

func Replace(s string, replaceMap map[string]string, allowUnresolved bool) (string, error)

func ResolveVar

func ResolveVar(s string, m map[string]interface{}) (interface{}, error)

func Validate

func Validate(s string, validator func(tag string) error) error

Types

type Template

type Template interface {
	Replace(replaceMap map[string]string, allowUnresolved bool) (string, error)
}

func NewTemplate

func NewTemplate(s string) (Template, error)

Jump to

Keyboard shortcuts

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