LoadTemplatesForTesting loads workspace templates from fsys, a filesystem rooted at a template data directory laid out like the embedded one (index.json plus one directory per template), with every load-time check the shipped templates go through. It lets a test outside this package seed a template
(fsys fs.FS)
| 11 | // Production code MUST NOT call this. The "ForTesting" suffix is the grep |
| 12 | // signal — any non-test caller is a bug. |
| 13 | func LoadTemplatesForTesting(fsys fs.FS) ([]WorkspaceTemplate, error) { |
| 14 | return loadTemplates(fsys) |
| 15 | } |