Answer architecture round 4: New keeps every module the loaded manifests read, and the note on a failed load names them all from one function beside noDataNote, so no category carries its source's modules
This commit is contained in:
@@ -37,7 +37,7 @@ func (f *Generator) NewTemplate(input string) (*Template, error) {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
if err := loadInline(&f.root, n, "template", false); err != nil {
|
||||
return nil, f.noDataNote(fmt.Errorf("fejkdata: %w", err))
|
||||
return nil, f.noDataNote(fmt.Errorf("fejkdata: %w", withDefaultModules(err, f.defaultModules)))
|
||||
}
|
||||
return &Template{g: f, n: n}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user