MCPcopy Create free account
hub / github.com/kataras/iris / Abs

Method Abs

view/django.go:70–76  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
70func (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.
79func (l *tDjangoAssetLoader) Get(path string) (io.Reader, error) {

Callers 4

parseYAMLFunction · 0.80
TOMLFunction · 0.80
AbsFunction · 0.80
RoundToIntegerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected