MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / LoadTemplates

Function LoadTemplates

util/template.go:70–72  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
70func 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.

Callers 3

initFunction · 0.92
initFunction · 0.92
TestLoadTemplatesFunction · 0.85

Calls 1

loadTemplatesFromFSFunction · 0.85

Tested by 1

TestLoadTemplatesFunction · 0.68