package boilertpl

import (
	"html/template"
	"strings"
)

func buildFuncMap() template.FuncMap {
	funcMap := make(template.FuncMap)
	funcMap["join"] = tplfuncJoin
	return funcMap
}

// THe "list" template function expects a list, which is formats as a comma-separated list.
func tplfuncJoin(sep string, a []string) string {
	return strings.Join(a, sep)
}
