Missing context readDir, required for any template using readDir* functions
Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>
This commit is contained in:
parent
824f7ba2b2
commit
684be0af50
|
|
@ -19,6 +19,7 @@ func NewFileRenderer(readFile func(filename string) ([]byte, error), basePath st
|
||||||
Context: &Context{
|
Context: &Context{
|
||||||
basePath: basePath,
|
basePath: basePath,
|
||||||
readFile: readFile,
|
readFile: readFile,
|
||||||
|
readDir: os.ReadDir,
|
||||||
},
|
},
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
|
|
@ -31,6 +32,7 @@ func NewFirstPassRenderer(basePath string, data interface{}) *FileRenderer {
|
||||||
preRender: true,
|
preRender: true,
|
||||||
basePath: basePath,
|
basePath: basePath,
|
||||||
readFile: os.ReadFile,
|
readFile: os.ReadFile,
|
||||||
|
readDir: os.ReadDir,
|
||||||
},
|
},
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue