template

package
v19.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = txttmpl.FuncMap{
	"inc":      func(i int) int { return i + 1 },
	"empty":    empty,
	"notempty": func(given interface{}) bool { return !empty(given) },
}

FuncMap defines the custom functions to be used in templates

Functions

func MergeFuncs

func MergeFuncs(funcs map[string]interface{}, overwrite bool) map[string]interface{}

MergeFuncs merges the template functions passed as parameter with FuncMap content If overwrite is true, will overwrite any existing entry

Types

This section is empty.

Jump to

Keyboard shortcuts

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