LoadTemplates loads all the templates found in the templates directory from the embedded filesystem. It returns an error if reading the directory or parsing any template fails.
(files embed.FS)
| 68 | // LoadTemplates loads all the templates found in the templates directory from the embedded filesystem. |
| 69 | // It returns an error if reading the directory or parsing any template fails. |
| 70 | func LoadTemplates(files embed.FS) error { |
| 71 | return loadTemplatesFromFS(files, templatesDir) |
| 72 | } |
| 73 | |
| 74 | // LoadTemplatesFromDir loads all the templates found in the specified directory from the filesystem. |
| 75 | // It returns an error if reading the directory or parsing any template fails. |