template

package
v3.2.3-jfd Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

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)

Replace takes a json-formatted string and performs variable replacement.

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