templates

package
v5.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: MIT Imports: 7 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)

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