func (m *Cloze) FuncMap(card *model.Card, face int) template.FuncMap {
	var templateID uint32
	if card != nil {
		// Need to do this check, because card may be nil during template parsing
		templateID = card.TemplateID()
	}
	funcMap := map[string]interface{}{
		"cloze": cloze(templateID, face),
	}
	for k, v := range defaultFuncMap {
		funcMap[k] = v
	}
	return funcMap
}
// FuncMap returns a function map for Cloze templates.
FuncMap returns a function map for Cloze templates.
// FuncMap returns a function map for Cloze templates .
func (m *Cloze) FuncMap(card *model.Card, face int) template.FuncMap {
	var templateID uint32
	if card != nil {
		templateID = card.TemplateID()
	}
	funcMap := map[string]interface{}{
		"cloze": cloze(templateID, face),
	}
	for k, v := range defaultFuncMap {
		funcMap[k] = v
	}
	return funcMap
}
func ( m * Cloze ) FuncMap ( card * model . Card , face int ) template . FuncMap { var templateID uint32 if card != nil { templateID = card . TemplateID ( ) } funcMap := map [ string ] interface { } { " " : cloze ( templateID , face ) , } for k , v := range defaultFuncMap { funcMap [ k ] = v } return funcMap }
FuncMap returns a function map for Cloze templates.
FuncMap returns a function map for Cloze templates .
// Need to do this check, because card may be nil during template parsing