templates

package
v5.0.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdentifierInvalidRe = regexp.MustCompile("[^a-z0-9]+")

Matches all invalid chars from rfc1035/rfc1123. See also: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/identifiers.md

Functions

func IdentifierFunc

func IdentifierFunc(s string) string

func MakeSliceFunc

func MakeSliceFunc(elements ...interface{}) []interface{}

Example: https://stackoverflow.com/a/25013152/393157

func Render

func Render(templateString string, variables Variables) (string, error)

func RenderAll

func RenderAll(templates map[string]string, variables Variables) (map[string]string, error)

Types

type Variables

type Variables map[string]string

func (*Variables) Defaults

func (v *Variables) Defaults(defaults Variables)

Jump to

Keyboard shortcuts

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