MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / LoadTemplatesForTesting

Function LoadTemplatesForTesting

internal/collections/testing_helpers.go:13–15  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

11// Production code MUST NOT call this. The "ForTesting" suffix is the grep
12// signal — any non-test caller is a bug.
13func LoadTemplatesForTesting(fsys fs.FS) ([]WorkspaceTemplate, error) {
14 return loadTemplates(fsys)
15}

Callers 2

task4918TemplateFunction · 0.92

Calls 1

loadTemplatesFunction · 0.85

Tested by 2

task4918TemplateFunction · 0.74