LoadTemplatesFromDir loads all the templates found in the specified directory from the filesystem. It returns an error if reading the directory or parsing any template fails.
(dir string)
| 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. |
| 76 | func LoadTemplatesFromDir(dir string) error { |
| 77 | return loadTemplatesFromFS(os.DirFS(dir), ".") |
| 78 | } |
| 79 | |
| 80 | // loadTemplatesFromFS is a helper function that loads templates from the given filesystem and directory. |
| 81 | // It returns an error if reading the directory or parsing any template fails. |