GetTemplateByString returns the parsed template as a string. It returns an error if the template processing fails.
(name string, data map[string]any)
| 54 | // GetTemplateByString returns the parsed template as a string. |
| 55 | // It returns an error if the template processing fails. |
| 56 | func GetTemplateByString(name string, data map[string]any) (string, error) { |
| 57 | tpl, err := processTemplate(name, data) |
| 58 | return tpl.String(), err |
| 59 | } |
| 60 | |
| 61 | // GetTemplateByBytes returns the parsed template as a byte slice. |
| 62 | // It returns an error if the template processing fails. |
no test coverage detected