MCPcopy
hub / github.com/flosch/pongo2 / TemplateLoader

Interface TemplateLoader

template_sets.go:14–21  ·  view source on GitHub ↗

TemplateLoader allows to implement a virtual file system.

Source from the content-addressed store, hash-verified

12
13// TemplateLoader allows to implement a virtual file system.
14type TemplateLoader interface {
15 // Abs calculates the path to a given template. Whenever a path must be resolved
16 // due to an import from another template, the base equals the parent template's path.
17 Abs(base, name string) string
18
19 // Get returns an io.Reader where the template's content can be read from.
20 Get(path string) (io.Reader, error)
21}
22
23// TemplateSet allows you to create your own group of templates with their own
24// global context (which is shared among all members of the set) and their own

Callers 3

SetBaseDirMethod · 0.65
resolveTemplateMethod · 0.65

Implementers 3

FSLoadertemplate_loader.go
LocalFilesystemLoadertemplate_loader.go
HttpFilesystemLoadertemplate_loader.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…