(name string, data any)
| 10 | var queriesFS embed.FS |
| 11 | |
| 12 | func execTemplate(name string, data any) string { |
| 13 | tpl := template.Must(template.New(name).Funcs(map[string]any{ |
| 14 | "sanitizeID": sanitizeID, |
| 15 | "sql": SQLType, |
| 16 | }).ParseFS(queriesFS, "templates/*.sql.tpl")) |
| 17 | var buf bytes.Buffer |
| 18 | template.Must(tpl, tpl.Execute(&buf, data)) |
| 19 | return buf.String() |
| 20 | } |
no test coverage detected