Abs calculates the path to a given template. Whenever a path must be resolved due to an import from another template, the base equals the parent template's path.
(base, name string)
| 68 | // Abs calculates the path to a given template. Whenever a path must be resolved |
| 69 | // due to an import from another template, the base equals the parent template's path. |
| 70 | func (l *tDjangoAssetLoader) Abs(base, name string) string { |
| 71 | if stdPath.IsAbs(name) { |
| 72 | return name |
| 73 | } |
| 74 | |
| 75 | return stdPath.Join(l.rootDir, name) |
| 76 | } |
| 77 | |
| 78 | // Get returns an io.Reader where the template's content can be read from. |
| 79 | func (l *tDjangoAssetLoader) Get(path string) (io.Reader, error) { |
no outgoing calls
no test coverage detected