templates/functions.go
func NewContextFunc(m map[string]interface{}) func(string) interface{} {
	return func(key string) interface{} {
		if value, ok := m[key]; ok {
			return value
		}
		return nil
	}
}
func NewContextFunc(m map[string]interface{}) func(string) interface{} {
	return func(key string) interface{} {
		if value, ok := m[key]; ok {
			return value
		}
		return nil
	}
}
// NewContextFunc creates a new function that can be used to store
// and access arbitrary data by keys.