TemplateLoader allows to implement a virtual file system.
| 12 | |
| 13 | // TemplateLoader allows to implement a virtual file system. |
| 14 | type 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…