mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 14:43:05 -03:00
sync to the latest github/linguist v7.9.0
This commit is contained in:
@ -106,7 +106,11 @@ func TestTemplateMatcherVars(t *testing.T) {
|
||||
|
||||
// render a tmpl
|
||||
const contentTmpl = "../assets/content.go.tmpl"
|
||||
tmpl, err := template.ParseFiles(contentTmpl)
|
||||
tmpl, err := template.New("content.go.tmpl").Funcs(template.FuncMap{
|
||||
"stringVal": func(val string) string {
|
||||
return fmt.Sprintf("`%s`", val)
|
||||
},
|
||||
}).ParseFiles(contentTmpl)
|
||||
require.NoError(t, err)
|
||||
|
||||
buf := bytes.NewBuffer(nil)
|
||||
|
Reference in New Issue
Block a user